From: Andrew Gaffney Date: Sun, 7 Dec 2008 05:53:09 +0000 (-0600) Subject: Add support for digests="all" for gentoo bug #209611 X-Git-Tag: CATALYST_2_0_6_916~60 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c3224d59320cdf5ceca30f0be7058bf561d7308f;p=catalyst.git Add support for digests="all" for gentoo bug #209611 --- diff --git a/ChangeLog b/ChangeLog index e7e42c85..fa662735 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ # Copyright 2002-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney # Distributed under the GPL v2 + 07 Dec 2008; Andrew Gaffney + modules/generic_stage_target.py: + Add support for digests="all" for gentoo bug #209611 + 07 Dec 2008; Andrew Gaffney examples/netboot2_template.spec, targets/support/kmerge.sh: Automatically append --netboot to GK_ARGS for netboot2 target Remove diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 88f847b5..6177eeaa 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -9,6 +9,7 @@ from catalyst_support import * from generic_target import * from stat import * import catalyst_lock + class generic_stage_target(generic_target): def __init__(self,myspec,addlargs): @@ -1611,10 +1612,16 @@ class generic_stage_target(generic_target): array.sort() for f in [file, file+'.CONTENTS']: if os.path.exists(f): - for j in array: - hash=generate_hash(f,hash_function=j,verbose=\ - self.settings.has_key("VERBOSE")) - myf.write(hash) + if "all" in array: + for k in hash_map.keys(): + hash=generate_hash(f,hash_function=k,verbose=\ + self.settings.has_key("VERBOSE")) + myf.write(hash) + else: + for j in array: + hash=generate_hash(f,hash_function=j,verbose=\ + self.settings.has_key("VERBOSE")) + myf.write(hash) myf.close() def purge(self):