Add support for digests="all" for gentoo bug #209611
authorAndrew Gaffney <agaffney@gentoo.org>
Sun, 7 Dec 2008 05:53:09 +0000 (23:53 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Sun, 7 Dec 2008 05:53:09 +0000 (23:53 -0600)
ChangeLog
modules/generic_stage_target.py

index e7e42c85b9ef92a4c6ed4788bcc8ce3c137d036f..fa66273590251917f938cc00d28b706434f6658b 100644 (file)
--- 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 <agaffney@gentoo.org>
+  modules/generic_stage_target.py:
+  Add support for digests="all" for gentoo bug #209611
+
   07 Dec 2008; Andrew Gaffney <agaffney@gentoo.org>
   examples/netboot2_template.spec, targets/support/kmerge.sh:
   Automatically append --netboot to GK_ARGS for netboot2 target Remove
index 88f847b58f13b13d69f773523003c047e0bb2dbc..6177eeaa1f24eed9d36a687291c7a6cad99ae16f 100644 (file)
@@ -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):