summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2019-10-01 15:03:28 -0700
committerPatrick Gartung <gartung@fnal.gov>2019-10-01 17:03:28 -0500
commitb92977492d9f329d44e356d6dbc6b1be6701f5ad (patch)
treeb7178909ed445fbe8f4adb441b8d668b65cb3332 /lib
parent436afdd2a85b45fbbeeeb017e8a3739de4bc6128 (diff)
downloadspack-b92977492d9f329d44e356d6dbc6b1be6701f5ad.tar.gz
spack-b92977492d9f329d44e356d6dbc6b1be6701f5ad.tar.bz2
spack-b92977492d9f329d44e356d6dbc6b1be6701f5ad.tar.xz
spack-b92977492d9f329d44e356d6dbc6b1be6701f5ad.zip
binary cache: show all packages for compatible differing targets (#12943)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/binary_distribution.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py
index cab0ad21ea..510e9c234d 100644
--- a/lib/spack/spack/binary_distribution.py
+++ b/lib/spack/spack/binary_distribution.py
@@ -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