summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-15 14:38:06 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-15 14:38:06 -0700
commit15bbd088e6007a9a6df8c4427340a371e5871506 (patch)
treeb8a77585efbf225703242bc2f4c59ffea796157a /lib
parentd8a402ae5bcfbea627967531f7ec35cf77946b4a (diff)
downloadspack-15bbd088e6007a9a6df8c4427340a371e5871506.tar.gz
spack-15bbd088e6007a9a6df8c4427340a371e5871506.tar.bz2
spack-15bbd088e6007a9a6df8c4427340a371e5871506.tar.xz
spack-15bbd088e6007a9a6df8c4427340a371e5871506.zip
Fix #551: version bug in `spack create`
- `spack create` now sets a proper version in generated file, based on the filename, even if it can't find any tarballs for the package.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/create.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py
index 4564143f83..f0cd50b8df 100644
--- a/lib/spack/spack/cmd/create.py
+++ b/lib/spack/spack/cmd/create.py
@@ -208,7 +208,7 @@ def find_repository(spec, args):
return repo
-def fetch_tarballs(url, name, args):
+def fetch_tarballs(url, name, version):
"""Try to find versions of the supplied archive by scraping the web.
Prompts the user to select how many to download if many are found.
@@ -222,7 +222,7 @@ def fetch_tarballs(url, name, args):
archives_to_fetch = 1
if not versions:
# If the fetch failed for some reason, revert to what the user provided
- versions = { "version" : url }
+ versions = { version : url }
elif len(versions) > 1:
tty.msg("Found %s versions of %s:" % (len(versions), name),
*spack.cmd.elide_list(
@@ -256,7 +256,7 @@ def create(parser, args):
tty.msg("Creating template for package %s" % name)
# Fetch tarballs (prompting user if necessary)
- versions, urls = fetch_tarballs(url, name, args)
+ versions, urls = fetch_tarballs(url, name, version)
# Try to guess what configure system is used.
guesser = ConfigureGuesser()