summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/checksum.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/spack/spack/cmd/checksum.py b/lib/spack/spack/cmd/checksum.py
index 5f27f9d174..96e36b39b6 100644
--- a/lib/spack/spack/cmd/checksum.py
+++ b/lib/spack/spack/cmd/checksum.py
@@ -63,6 +63,16 @@ def checksum(parser, args):
if not url_dict:
tty.die("Could not find any versions for {0}".format(pkg.name))
+ # And ensure the specified version URLs take precedence, if available
+ try:
+ explicit_dict = {}
+ for v in pkg.versions:
+ if not v.isdevelop():
+ explicit_dict[v] = pkg.url_for_version(v)
+ url_dict.update(explicit_dict)
+ except spack.package.NoURLError:
+ pass
+
version_lines = spack.stage.get_checksums_for_versions(
url_dict, pkg.name, keep_stage=args.keep_stage,
batch=(args.batch or len(args.versions) > 0 or len(url_dict) == 1),