summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/util/web.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py
index 959d03781e..99078b203a 100644
--- a/lib/spack/spack/util/web.py
+++ b/lib/spack/spack/util/web.py
@@ -304,9 +304,8 @@ def find_versions_of_archive(archive_urls, list_url=None, list_depth=0):
list_urls.update(additional_list_urls)
# Grab some web pages to scrape.
- # Start with any links already given.
pages = {}
- links = set(archive_urls)
+ links = set()
for lurl in list_urls:
pg, lnk = spider(lurl, depth=list_depth)
pages.update(pg)
@@ -345,8 +344,10 @@ def find_versions_of_archive(archive_urls, list_url=None, list_depth=0):
regexes.append(url_regex)
# Build a dict version -> URL from any links that match the wildcards.
+ # Walk through archive_url links first.
+ # Any conflicting versions will be overwritten by the list_url links.
versions = {}
- for url in sorted(links):
+ for url in archive_urls + sorted(links):
if any(re.search(r, url) for r in regexes):
try:
ver = spack.url.parse_version(url)