From: Michael Tremer Date: Sun, 10 Jan 2010 14:38:31 +0000 (+0100) Subject: naoki: Remove a build environment before build if it is already there. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e020cabf4de05f2f5c57b1c3ff9ccd2f5611d681;p=ipfire-3.x.git naoki: Remove a build environment before build if it is already there. --- diff --git a/naoki/chroot.py b/naoki/chroot.py index c57d38857..4c1465586 100644 --- a/naoki/chroot.py +++ b/naoki/chroot.py @@ -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: