binary cache: show all packages for compatible differing targets (#12943)

This commit is contained in:
Greg Becker 2019-10-01 15:03:28 -07:00 committed by Patrick Gartung
parent 436afdd2a8
commit b92977492d

View file

@ -609,7 +609,9 @@ def get_specs(force=False):
tty.warn("No Spack mirrors are currently configured")
return {}
path = str(spack.architecture.sys_type())
arch = spack.architecture.sys_type()
arch_spec = 'platform=%s os=%s target=:%s' % tuple(arch.split('-'))
urls = set()
for mirror_name, mirror_url in mirrors.items():
if mirror_url.startswith('file'):
@ -626,7 +628,7 @@ def get_specs(force=False):
tty.msg("Finding buildcaches on %s" % mirror_url)
p, links = spider(mirror_url + "/" + _build_cache_relative_path)
for link in links:
if re.search("spec.yaml", link) and re.search(path, link):
if re.search("spec.yaml", link):
urls.add(link)
_cached_specs = []
@ -645,7 +647,8 @@ def get_specs(force=False):
# we need to mark this spec concrete on read-in.
spec = Spec.from_yaml(f)
spec._mark_concrete()
_cached_specs.append(spec)
if spec.satisfies(arch_spec):
_cached_specs.append(spec)
return _cached_specs