small bugfix to cdroot cleaning handling
authorJohn P. Davis <zhen@gentoo.org>
Wed, 14 Jul 2004 04:26:45 +0000 (04:26 +0000)
committerJohn P. Davis <zhen@gentoo.org>
Wed, 14 Jul 2004 04:26:45 +0000 (04:26 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@417 d1e1f19c-881f-0410-ab34-b69fee027534

modules/livecd_stage2_target.py

index 4c5874950cfb228bc86fe298d14b57f529055368..09c37bb11dbdc13e1fae0f89e7fff13d43be8cea 100644 (file)
@@ -1,6 +1,6 @@
 # Distributed under the GNU General Public License version 2
 # Copyright 2003-2004 Gentoo Technologies, Inc.
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.13 2004/07/13 15:42:12 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.14 2004/07/14 04:26:45 zhen Exp $
 
 """
 Builder class for a LiveCD stage2 build.
@@ -241,8 +241,11 @@ class livecd_stage2_target(generic_stage_target):
                                print "cleaning previous livecd-stage2 build"
                                cmd("rm -rf "+self.settings["cdroot_path"],
                                        "Could not remove existing directory: "+self.settings["cdroot_path"])
+                       
+                       if not os.path.exists(self.settings["cdroot_path"]):
                                os.makedirs(self.settings["cdroot_path"])
-                               touch(self.settings["chroot_path"]+"/tmp/.clst_run_local_cdroot_clean")
+                               
+                       touch(self.settings["chroot_path"]+"/tmp/.clst_run_local_cdroot_clean")
                                
                # the runscripts do the real building, so execute them now
                # this is the part that we want to resume on since it is the most time consuming