Always clear autoresume points after a successful run
authorEric Edgar <rocket@gentoo.org>
Fri, 9 Dec 2005 16:13:56 +0000 (16:13 +0000)
committerEric Edgar <rocket@gentoo.org>
Fri, 9 Dec 2005 16:13:56 +0000 (16:13 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@955 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/generic_stage_target.py

index 39518207c9dc2f5cf2806db07ac46bb87dbe6d75..9fa6e6bab1bda309c152e8d66819d21aa160c127 100644 (file)
--- 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 <rocket@gentoo.org>
+  modules/generic_stage_target.py:
+  Always clear autoresume points after a successful run
 
   09 Dec 2005; Chris Gianelloni <wolf31o2@gentoo.org>
   targets/support/livecdfs-update.sh:
index e37150a47784a14fe6242058909dbd6fb3d65a6a..81df6dc2da7d49a7109492d5d405a362888ae748 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/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"):