From: Eric Edgar Date: Tue, 25 Apr 2006 17:10:11 +0000 (+0000) Subject: change hash result format so .DIGESTS is generated correctly X-Git-Tag: CATALYST_2_0_6_916~369 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cc5760db48b6d0a67d196d9bab37d6c2f3a7511c;p=catalyst.git change hash result format so .DIGESTS is generated correctly git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1125 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index 71ed4846..022dd62b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.610 2006/04/25 15:21:37 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.611 2006/04/25 17:10:11 rocket Exp $ + + 25 Apr 2006; Eric Edgar modules/catalyst_support.py: + change hash result format so .DIGESTS is generated correctly 25 Apr 2006; Chris Gianelloni modules/catalyst_support.py: diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py index 3f4bb797..18098434 100644 --- a/modules/catalyst_support.py +++ b/modules/catalyst_support.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/catalyst_support.py,v 1.70 2006/04/25 15:21:37 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.71 2006/04/25 17:10:11 rocket Exp $ import sys,string,os,types,re,signal,traceback,time #import md5,sha @@ -84,12 +84,14 @@ def calc_hash(file,cmd,cmd_args,id_string="MD5",verbose=False): def calc_hash2(file,cmd,cmd_args,id_string="MD5",verbose=False): a=os.popen(cmd+" "+cmd_args+" "+file) - a.readline() + header=a.readline() mylines=a.readline().split() + hash=mylines[0] + short_file=os.path.split(mylines[1])[1] a.close() - result=mylines[0] + result=header+hash+" "+short_file if verbose: - print id_string+" (%s) = %s" % (file, result) + print header+" (%s) = %s" % (short_file, result) return result #This has map must be defined after the function calc_hash