]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
naoki: Remove a build environment before build if it is already there.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 Jan 2010 14:38:31 +0000 (15:38 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 10 Jan 2010 14:38:31 +0000 (15:38 +0100)
naoki/chroot.py

index c57d388574a165de9d52fe381879895e6fe2e751..4c14655867fadb68504c0326a933cf8b578753a9 100644 (file)
@@ -61,6 +61,9 @@ class Environment(object):
        def _init(self):
                self._setupLogging()
 
+               if os.path.exists(self.chrootPath()):
+                       self.clean()
+
                # create dirs
                self.log.debug("Creating directories...")
                dirs = (
@@ -99,8 +102,8 @@ class Environment(object):
                self._setupToolchain()
        
        def clean(self):
-               pass
-       
+               util.rm(self.chrootPath())
+
        def make(self, target):
                file = self.package.filename
                if not self.toolchain: