3333from spack .spec import Spec
3434from spack .stage import Stage
3535from 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