summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2016-10-16 16:46:29 -0500
committerTodd Gamblin <tgamblin@llnl.gov>2016-10-16 14:46:29 -0700
commitd891143a08541c45ac5d5716f60238df4711410a (patch)
tree5ed53b775ff01dfdfa5dc179884a62e068d72311
parent193f68083f71f43027e8c89e11319b9e64a70bce (diff)
downloadspack-d891143a08541c45ac5d5716f60238df4711410a.tar.gz
spack-d891143a08541c45ac5d5716f60238df4711410a.tar.bz2
spack-d891143a08541c45ac5d5716f60238df4711410a.tar.xz
spack-d891143a08541c45ac5d5716f60238df4711410a.zip
Ignore GPG/PGP signatures/checksums when finding available downloads (#2028)
* Ignore GPG/PGP signatures/checksums when finding available downloads * Remove duplicated basename
-rw-r--r--lib/spack/spack/url.py2
-rw-r--r--lib/spack/spack/util/web.py11
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py
index af4b8a51ef..8842495613 100644
--- a/lib/spack/spack/url.py
+++ b/lib/spack/spack/url.py
@@ -323,7 +323,7 @@ def parse_name_and_version(path):
def insensitize(string):
"""Change upper and lowercase letters to be case insensitive in
- the provided string. e.g., 'a' because '[Aa]', 'B' becomes
+ the provided string. e.g., 'a' becomes '[Aa]', 'B' becomes
'[bB]', etc. Use for building regexes."""
def to_ins(match):
char = match.group(1)
diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py
index 29ed6e0d32..935532266f 100644
--- a/lib/spack/spack/util/web.py
+++ b/lib/spack/spack/util/web.py
@@ -227,7 +227,16 @@ def find_versions_of_archive(*archive_urls, **kwargs):
# We'll be a bit more liberal and just look for the archive
# part, not the full path.
- regexes.append(os.path.basename(url_regex))
+ url_regex = os.path.basename(url_regex)
+
+ # We need to add a $ anchor to the end of the regex to prevent
+ # Spack from picking up signature files like:
+ # .asc
+ # .md5
+ # .sha256
+ # .sig
+ # However, SourceForge downloads still need to end in '/download'.
+ regexes.append(url_regex + '(\/download)?$')
# Build a dict version -> URL from any links that match the wildcards.
versions = {}