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.
This commit is contained in:
parent
4ebff5cef9
commit
f5844d3d81
1 changed files with 4 additions and 0 deletions
|
@ -2011,6 +2011,10 @@ def all_urls(self):
|
||||||
if hasattr(self, 'url') and self.url:
|
if hasattr(self, 'url') and self.url:
|
||||||
urls.append(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():
|
for args in self.versions.values():
|
||||||
if 'url' in args:
|
if 'url' in args:
|
||||||
urls.append(args['url'])
|
urls.append(args['url'])
|
||||||
|
|
Loading…
Reference in a new issue