From: Brad House Date: Sun, 18 Jan 2004 21:14:02 +0000 (+0000) Subject: properly clean up livecd-stage3 X-Git-Tag: CATALYST_1_0_1~61 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=62aaaae0662acd95a330e60b1b2a844bbf6ee042;p=catalyst.git properly clean up livecd-stage3 git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@179 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/modules/targets.py b/modules/targets.py index 4adf5c11..964300fe 100644 --- a/modules/targets.py +++ b/modules/targets.py @@ -514,8 +514,13 @@ class livecd_stage3_target(generic_stage_target): # raise def cdroot_setup(self): - if not os.path.exists(self.settings["cdroot_path"]): - os.makedirs(self.settings["cdroot_path"]) + if os.path.exists(self.settings["cdroot_path"]): + print "cleaning previous livecd-stage3 build" + cmd("rm -rf "+self.settings["cdroot_path"],"Could not remove existing directory: "+self.settings["cdroot_path"]) + + print "creating livecd-stage3 cdroot" + os.makedirs(self.settings["cdroot_path"]) + cmd("env ARCH_RUNSCRIPT="+self.settings["livecd/archscript"]+" LOOPTYPE="+self.settings["livecd/looptype"]+" /bin/bash "+self.settings["livecd/runscript"]+" setup_bootloader","setup_bootloader runscript failed.") cmd("env ARCH_RUNSCRIPT="+self.settings["livecd/archscript"]+" LOOPTYPE="+self.settings["livecd/looptype"]+" /bin/bash "+self.settings["livecd/runscript"]+" loop","loop runscript failed.") print "livecd-stage3: complete!"