# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.483 2005/12/21 15:04:09 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.484 2005/12/21 15:12:37 rocket Exp $
+
+ 21 Dec 2005; Eric Edgar <rocket@gentoo.org>
+ modules/generic_stage_target.py:
+ Change digests file format to HASH_NAME HASH FILE_NAME
21 Dec 2005; Chris Gianelloni <wolf31o2@gentoo.org>
targets/stage1/stage1-controller.sh:
# 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.105 2005/12/20 22:51:00 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.106 2005/12/21 15:12:37 rocket Exp $
"""
This class does all of the chroot setup, copying of files, etc. It is
def set_source_subpath(self):
if type(self.settings["source_subpath"]) != types.StringType:
raise CatalystError, "source_subpath should have been a string. Perhaps you have something wrong in your spec file?"
-
+
def set_pkgcache_path(self):
self.settings["pkgcache_path"]=normpath(self.settings["storedir"]+"/packages/"+\
self.settings["target_subpath"]+"/")
def set_snapshot_path(self):
self.settings["snapshot_path"]=normpath(self.settings["storedir"]+"/snapshots/portage-"+self.settings["snapshot"]+".tar.bz2")
+
if os.path.exists(self.settings["snapshot_path"]):
self.settings["snapshot_path_hash"]=generate_hash(self.settings["snapshot_path"],\
hash_function=self.settings["hash_function"],verbose=False)
os.remove(file+".digests")
if self.settings.has_key("digests"):
if os.path.exists(file):
- myf=open(file+".digests","w")
+ myf=open(file+".digests","w")
+ 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+"\n")
+ myf.write(hash_map[i][3]+" "+hash+" "+os.path.split(file)[1]+"\n")
myf.close()
def purge(self):