From f5844d3d816d9b4e38a8259b68765a3c3b094a4c Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 8 May 2020 01:12:45 -0700 Subject: [PATCH] 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 ` for packages that are populated with from mixin mirror `urls`. Example: `util-macros` from x.org mixin. --- lib/spack/spack/package.py | 4 ++++ 1 file changed, 4 insertions(+) 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 @@ def all_urls(self): 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'])