diff options
author | Peter Scheibel <scheibel1@llnl.gov> | 2016-03-29 18:48:25 -0700 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2016-03-29 18:48:25 -0700 |
commit | 03d907e1e5bfc01f7cdb457dbcd58bb903683e34 (patch) | |
tree | 891774df39fa01aeb58820ec25802175e8f5468a | |
parent | ce4de6227e339bab98f8a73013bce1898f275b6f (diff) | |
download | spack-03d907e1e5bfc01f7cdb457dbcd58bb903683e34.tar.gz spack-03d907e1e5bfc01f7cdb457dbcd58bb903683e34.tar.bz2 spack-03d907e1e5bfc01f7cdb457dbcd58bb903683e34.tar.xz spack-03d907e1e5bfc01f7cdb457dbcd58bb903683e34.zip |
in the case of multiple digests, avoid creating different mirror filenames from run to run (as long as the available digests do not change)
-rw-r--r-- | lib/spack/spack/mirror.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/mirror.py b/lib/spack/spack/mirror.py index 78db22f73b..64f589ad8b 100644 --- a/lib/spack/spack/mirror.py +++ b/lib/spack/spack/mirror.py @@ -65,7 +65,7 @@ def mirror_archive_filename(spec, fetcher): digests = spec.package.digests if digests: # If a package has multiple digests, any one is sufficient to identify it - digestType, digest = digests.iteritems().next() + digestType, digest = sorted(digests.iteritems())[0] tokens.extend([digestType, digest]) filename = '-'.join(str(t) for t in tokens) if ext: |