Minor changes/bugfixes on md5/checksum PR
This commit is contained in:
parent
747855b960
commit
a4861a3072
4 changed files with 6 additions and 9 deletions
|
@ -56,8 +56,7 @@ def get_checksums(versions, urls, **kwargs):
|
|||
i = 0
|
||||
for url, version in zip(urls, versions):
|
||||
try:
|
||||
with Stage(url) as stage:
|
||||
stage.delete_on_exit = not keep_stage
|
||||
with Stage(url, keep=keep_stage) as stage:
|
||||
stage.fetch()
|
||||
if i == 0 and first_stage_function:
|
||||
first_stage_function(stage)
|
||||
|
@ -96,7 +95,7 @@ def checksum(parser, args):
|
|||
tty.msg("Found %s versions of %s" % (len(versions), pkg.name),
|
||||
*spack.cmd.elide_list(
|
||||
["%-10s%s" % (v, versions[v]) for v in sorted_versions]))
|
||||
print()
|
||||
print
|
||||
archives_to_fetch = tty.get_number(
|
||||
"How many would you like to checksum?", default=5, abort='q')
|
||||
|
||||
|
|
|
@ -67,6 +67,6 @@ def md5(parser, args):
|
|||
tty.warn("%s" % e)
|
||||
|
||||
# Dump the MD5s at last without interleaving them with downloads
|
||||
tty.msg("Number of MD5 check-sums computed: %s " % len(results))
|
||||
tty.msg("%d MD5 checksums:" % len(results))
|
||||
for checksum, url in results:
|
||||
tty.msg("%s %s" % (checksum, url))
|
||||
print "%s %s" % (checksum, url)
|
||||
|
|
|
@ -50,6 +50,4 @@ def stage(parser, args):
|
|||
specs = spack.cmd.parse_specs(args.specs, concretize=True)
|
||||
for spec in specs:
|
||||
package = spack.repo.get(spec)
|
||||
with package.stage as stage:
|
||||
stage.delete_on_exit = False
|
||||
package.do_stage()
|
||||
|
|
|
@ -441,7 +441,7 @@ def __enter__(self):
|
|||
|
||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||
for item in reversed(self):
|
||||
item.delete_on_exit = getattr(self, 'delete_on_exit', True)
|
||||
item.keep = getattr(self, 'keep', None)
|
||||
item.__exit__(exc_type, exc_val, exc_tb)
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue