change hash result format so .DIGESTS is generated correctly
authorEric Edgar <rocket@gentoo.org>
Tue, 25 Apr 2006 17:10:11 +0000 (17:10 +0000)
committerEric Edgar <rocket@gentoo.org>
Tue, 25 Apr 2006 17:10:11 +0000 (17:10 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1125 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/catalyst_support.py

index 71ed4846abc1ce3997430735105fe71b166d9089..022dd62b9b1261c556df59b0665663c73b771654 100644 (file)
--- 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 <rocket@gentoo.org> modules/catalyst_support.py:
+  change hash result format so .DIGESTS is generated correctly
 
   25 Apr 2006; Chris Gianelloni <wolf31o2@gentoo.org>
   modules/catalyst_support.py:
index 3f4bb7974afb0bd69144510f6ac6186861a5603c..18098434525ce0ad0a6389b7cace92061978f6d4 100644 (file)
@@ -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