Skip to content

Commit d0523ca

Browse files
authored
Follow the example of spack arch (spack#14642)
1 parent e01c390 commit d0523ca

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/spack/spack/binary_distribution.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from spack.spec import Spec
3434
from spack.stage import Stage
3535
from spack.util.gpg import Gpg
36+
import spack.architecture as architecture
3637

3738
_build_cache_relative_path = 'build_cache'
3839

@@ -669,6 +670,9 @@ def get_specs(force=False, use_arch=False):
669670
"""
670671
global _cached_specs
671672

673+
arch = architecture.Arch(architecture.platform(),
674+
'default_os', 'default_target')
675+
672676
if _cached_specs:
673677
tty.debug("Using previously-retrieved specs")
674678
return _cached_specs
@@ -691,8 +695,8 @@ def get_specs(force=False, use_arch=False):
691695
if re.search('spec.yaml', file):
692696
link = url_util.join(fetch_url_build_cache, file)
693697
if use_arch and re.search('%s-%s' %
694-
(spack.architecture.platform,
695-
spack.architecture.os),
698+
(arch.platform,
699+
arch.os),
696700
file):
697701
urls.add(link)
698702
else:
@@ -705,8 +709,8 @@ def get_specs(force=False, use_arch=False):
705709
for link in links:
706710
if re.search("spec.yaml", link):
707711
if use_arch and re.search('%s-%s' %
708-
(spack.architecture.platform,
709-
spack.architecture.os),
712+
(arch.platform,
713+
arch.os),
710714
link):
711715
urls.add(link)
712716
else:

0 commit comments

Comments
 (0)