summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2018-09-18 21:29:18 -0500
committerscheibelp <scheibel1@llnl.gov>2018-09-18 19:29:18 -0700
commit133dd7a4ac7b621df9d2296ec933c2b44bcac3ed (patch)
treeae409035ec7442f25185b7c8e1cf9be4e1d26d29 /lib
parent467d501060dbad60584a310ab75d9c85778b1ee6 (diff)
downloadspack-133dd7a4ac7b621df9d2296ec933c2b44bcac3ed.tar.gz
spack-133dd7a4ac7b621df9d2296ec933c2b44bcac3ed.tar.bz2
spack-133dd7a4ac7b621df9d2296ec933c2b44bcac3ed.tar.xz
spack-133dd7a4ac7b621df9d2296ec933c2b44bcac3ed.zip
Fix version parsing for cistem package (#9260)
Adds 'code' to the list of suffixes that are excluded from version parsing of URLs, such that if a URL contains the string 'cistem-1.0.0-beta-source-code', a version X will substitute in to produce a URL with cistem-X-source-code ('source' was already excluded). The 'cistem' package version is updated to make use of this (and fix a fetching bug with the cistem package). A unit test is added to check this parsing case.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/url_parse.py2
-rw-r--r--lib/spack/spack/url.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/spack/spack/test/url_parse.py b/lib/spack/spack/test/url_parse.py
index 4a3550149d..9603a91213 100644
--- a/lib/spack/spack/test/url_parse.py
+++ b/lib/spack/spack/test/url_parse.py
@@ -43,6 +43,8 @@ from spack.version import Version
('jpegsrc.v9b', 'jpegsrc.v9b'),
('turbolinux702', 'turbolinux702'),
('converge_install_2.3.16', 'converge_install_2.3.16'),
+ # Download type - code, source
+ ('cistem-1.0.0-beta-source-code', 'cistem-1.0.0-beta'),
# Download type - src
('apache-ant-1.9.7-src', 'apache-ant-1.9.7'),
('go1.7.4.src', 'go1.7.4'),
diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py
index ed3867ba7b..ddcfe9c17e 100644
--- a/lib/spack/spack/url.py
+++ b/lib/spack/spack/url.py
@@ -169,6 +169,7 @@ def strip_version_suffixes(path):
# Download type
'[Ii]nstall',
'all',
+ 'code',
'src(_0)?',
'[Ss]ources?',
'file',