From 0f7c20bf29e41c6d902868825b0d08f87665150f Mon Sep 17 00:00:00 2001 From: Eric Edgar Date: Fri, 9 Dec 2005 16:13:56 +0000 Subject: [PATCH] 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 --- ChangeLog | 6 +++++- modules/generic_stage_target.py | 25 +++++++++++++------------ 2 files changed, 18 insertions(+), 13 deletions(-) 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"): -- 2.26.2