summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2017-08-05 10:15:47 -0500
committerGitHub <noreply@github.com>2017-08-05 10:15:47 -0500
commita31ce17f0b08f2ca5eb9e14b571a8de2db69ab5b (patch)
treeb6a2dd093db200e7016bfd41cca6dbb3acaae49e /lib
parentc7df12f69826448fd9af875e44348b8f8d0ff067 (diff)
downloadspack-a31ce17f0b08f2ca5eb9e14b571a8de2db69ab5b.tar.gz
spack-a31ce17f0b08f2ca5eb9e14b571a8de2db69ab5b.tar.bz2
spack-a31ce17f0b08f2ca5eb9e14b571a8de2db69ab5b.tar.xz
spack-a31ce17f0b08f2ca5eb9e14b571a8de2db69ab5b.zip
Various fixes to package name URL parsing (#4978)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/url.py2
-rw-r--r--lib/spack/spack/test/url_parse.py2
-rw-r--r--lib/spack/spack/url.py1
3 files changed, 5 insertions, 0 deletions
diff --git a/lib/spack/spack/cmd/url.py b/lib/spack/spack/cmd/url.py
index 49c29ff469..633e345640 100644
--- a/lib/spack/spack/cmd/url.py
+++ b/lib/spack/spack/cmd/url.py
@@ -334,6 +334,8 @@ def name_parsed_correctly(pkg, name):
pkg_name = pkg_name[2:]
elif pkg_name.startswith('py-'):
pkg_name = pkg_name[3:]
+ elif pkg_name.startswith('perl-'):
+ pkg_name = pkg_name[5:]
elif pkg_name.startswith('octave-'):
pkg_name = pkg_name[7:]
diff --git a/lib/spack/spack/test/url_parse.py b/lib/spack/spack/test/url_parse.py
index 41a2fda649..5749ff2d6e 100644
--- a/lib/spack/spack/test/url_parse.py
+++ b/lib/spack/spack/test/url_parse.py
@@ -124,6 +124,8 @@ def test_url_strip_version_suffixes(url, expected):
('converge_install_2.3.16', '2.3.16', 'converge'),
# Download type - src
('jpegsrc.v9b', '9b', 'jpeg'),
+ # Download type - archive
+ ('coinhsl-archive-2014.01.17', '2014.01.17', 'coinhsl'),
# Download type - std
('ghostscript-fonts-std-8.11', '8.11', 'ghostscript-fonts'),
# Download version - release
diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py
index e3da753a76..67a58cdd12 100644
--- a/lib/spack/spack/url.py
+++ b/lib/spack/spack/url.py
@@ -290,6 +290,7 @@ def strip_name_suffixes(path, version):
'install',
'src',
'(open)?[Ss]ources?',
+ '[._-]archive',
'[._-]std',
# Download version