From 53cbccf9772ee0b64fe29e78977079c76c89b7d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Wed, 3 Aug 2005 20:34:43 +0000 Subject: [PATCH] * WorkDir must cleaned before unpack and InstallDir must cleaned before install actions... --- pisi/build.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pisi/build.py b/pisi/build.py index 04ac538d..c12f21df 100644 --- a/pisi/build.py +++ b/pisi/build.py @@ -104,10 +104,6 @@ class PisiBuild: ui.info("Building PISI source package: %s\n" % self.spec.source.name) - # remove the work/install directory before the build process - if os.path.exists(self.ctx.pkg_dir()): - util.clean_dir(self.ctx.pkg_dir()) - self.compileActionScript() self.fetchSourceArchive() @@ -146,6 +142,11 @@ class PisiBuild: def unpackSourceArchive(self): ui.info("Unpacking archive...") + + # Before unpack make sure work_dir is clean + if os.path.exists(self.ctx.pkg_work_dir()): + util.clean_dir(self.ctx.pkg_work_dir()) + self.sourceArchive.unpack() ui.info(" unpacked (%s)\n" % self.ctx.pkg_work_dir()) self.setState("unpacked") @@ -163,6 +164,11 @@ class PisiBuild: def runInstallAction(self): ui.action("Installing...\n") + + # Before install make sure install_dir is clean + if os.path.exists(self.ctx.pkg_install_dir()): + util.clean_dir(self.ctx.pkg_install_dir()) + # install function is mandatory! self.runActionFunction(const.install_func, True) self.setState("installaction")