summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Huebl <axel.huebl@plasma.ninja>2020-05-08 01:12:45 -0700
committerGitHub <noreply@github.com>2020-05-08 10:12:45 +0200
commitf5844d3d816d9b4e38a8259b68765a3c3b094a4c (patch)
tree5e50d46b2517d0eaafe8fc2b07e3d5949de8f8db
parent4ebff5cef9e00bc858f85ca121dd47c9cf580ae9 (diff)
downloadspack-f5844d3d816d9b4e38a8259b68765a3c3b094a4c.tar.gz
spack-f5844d3d816d9b4e38a8259b68765a3c3b094a4c.tar.bz2
spack-f5844d3d816d9b4e38a8259b68765a3c3b094a4c.tar.xz
spack-f5844d3d816d9b4e38a8259b68765a3c3b094a4c.zip
all_urls: add urls[0] for versions (#16435)
This adds the `url` alternative `urls` to `package.all_urls`. With this addition, one can find again new versions with `spack versions <package>` for packages that are populated with from mixin mirror `urls`. Example: `util-macros` from x.org mixin.
-rw-r--r--lib/spack/spack/package.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 40384077ea..9b6f0efb48 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -2011,6 +2011,10 @@ class PackageBase(with_metaclass(PackageMeta, PackageViewMixin, object)):
if hasattr(self, 'url') and self.url:
urls.append(self.url)
+ # fetch from first entry in urls to save time
+ if hasattr(self, 'urls') and self.urls:
+ urls.append(self.urls[0])
+
for args in self.versions.values():
if 'url' in args:
urls.append(args['url'])