From: Eric Edgar Date: Tue, 25 Apr 2006 17:13:28 +0000 (+0000) Subject: digests function uses raw output from hash function now X-Git-Tag: CATALYST_2_0_6_916~368 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d128d2a554b0f3b8c33c553790ef827dace75392;p=catalyst.git digests function uses raw output from hash function now git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1126 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index 022dd62b..7c563cab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.611 2006/04/25 17:10:11 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.612 2006/04/25 17:13:28 rocket Exp $ + + 25 Apr 2006; Eric Edgar + modules/generic_stage_target.py: + digests function uses raw output from hash function now 25 Apr 2006; Eric Edgar modules/catalyst_support.py: change hash result format so .DIGESTS is generated correctly diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index d65d443f..54b1ec82 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.132 2006/04/21 13:00:50 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.133 2006/04/25 17:13:28 rocket Exp $ """ This class does all of the chroot setup, copying of files, etc. It is @@ -1348,7 +1348,7 @@ class generic_stage_target(generic_target): os.chown(myemp,mystat[ST_UID],mystat[ST_GID]) os.chmod(myemp,mystat[ST_MODE]) - def gen_digest_file(self,file): + def gen_digest_file(self,file): if os.path.exists(file+".DIGESTS"): os.remove(file+".DIGESTS") if self.settings.has_key("digests"): @@ -1357,15 +1357,15 @@ class generic_stage_target(generic_target): keys={} for i in self.settings["digests"].split(): keys[i]=1 - array=keys.keys() - array.sort() - for i in array: - if self.settings.has_key("VERBOSE"): - hash=generate_hash(file,hash_function=i,verbose=True) - else: - hash=generate_hash(file,hash_function=i) - myf.write(hash_map[i][3]+" "+hash+" "+os.path.split(file)[1]+"\n") - myf.close() + array=keys.keys() + array.sort() + for i in array: + if self.settings.has_key("VERBOSE"): + hash=generate_hash(file,hash_function=i,verbose=True) + else: + hash=generate_hash(file,hash_function=i) + myf.write(hash) + myf.close() def purge(self): countdown(10,"Purging Caches ...")