From: Eric Edgar Date: Fri, 9 Dec 2005 16:13:56 +0000 (+0000) Subject: Always clear autoresume points after a successful run X-Git-Tag: CATALYST_2_0_6_916~539 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0f7c20bf29e41c6d902868825b0d08f87665150f;p=catalyst.git Always clear autoresume points after a successful run git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@955 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index 39518207..9fa6e6ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.442 2005/12/09 14:46:38 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.443 2005/12/09 16:13:56 rocket Exp $ + + 09 Dec 2005; Eric Edgar + modules/generic_stage_target.py: + Always clear autoresume points after a successful run 09 Dec 2005; Chris Gianelloni targets/support/livecdfs-update.sh: diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index e37150a4..81df6dc2 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.93 2005/12/08 22:23:31 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.94 2005/12/09 16:13:56 rocket Exp $ """ This class does all of the chroot setup, copying of files, etc. It is @@ -1231,17 +1231,18 @@ class generic_stage_target(generic_target): # clean resume points since they are no longer needed if self.settings.has_key("AUTORESUME"): print "Removing AutoResume Points: ..." - myemp=self.settings["autoresume_path"] - if os.path.isdir(myemp): - print "Emptying directory",myemp - # stat the dir, delete the dir, recreate the dir and set - # the proper perms and ownership - mystat=os.stat(myemp) - #cmd("rm -rf "+myemp, "Could not remove existing file: "+myemp,env-self.env) - shutil.rmtree(myemp) - os.makedirs(myemp,0755) - os.chown(myemp,mystat[ST_UID],mystat[ST_GID]) - os.chmod(myemp,mystat[ST_MODE]) + myemp=self.settings["autoresume_path"] + if os.path.isdir(myemp): + if self.settings.has_key("AUTORESUME"): + print "Emptying directory",myemp + # stat the dir, delete the dir, recreate the dir and set + # the proper perms and ownership + mystat=os.stat(myemp) + #cmd("rm -rf "+myemp, "Could not remove existing file: "+myemp,env-self.env) + shutil.rmtree(myemp) + os.makedirs(myemp,0755) + os.chown(myemp,mystat[ST_UID],mystat[ST_GID]) + os.chmod(myemp,mystat[ST_MODE]) def gen_digest_file(self,file): if os.path.exists(file+".digests"):