From c3224d59320cdf5ceca30f0be7058bf561d7308f Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Sat, 6 Dec 2008 23:53:09 -0600 Subject: [PATCH] Add support for digests="all" for gentoo bug #209611 --- ChangeLog | 4 ++++ modules/generic_stage_target.py | 15 +++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) 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): -- 2.26.2