Make Binpkg clean the build dir immediately after locking it. This ensures
authorZac Medico <zmedico@gentoo.org>
Fri, 12 Dec 2008 21:39:19 +0000 (21:39 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 12 Dec 2008 21:39:19 +0000 (21:39 -0000)
that a new PORTAGE_LOG_FILE is created. (trunk r12198)

svn path=/main/branches/2.1.6/; revision=12231

pym/_emerge/__init__.py

index 3a5d82cec0b5c73d6b0647031c31c135e18fbd20..3c2cf87c24cb8c9048dbe4e6b0d2f61d4ba563fd 100644 (file)
@@ -3167,6 +3167,12 @@ class Binpkg(CompositeTask):
                pkg_count = self.pkg_count
                if not self.opts.fetchonly:
                        self._build_dir.lock()
+                       try:
+                               shutil.rmtree(self._build_dir.dir_path)
+                       except EnvironmentError, e:
+                               if e.errno != errno.ENOENT:
+                                       raise
+                               del e
                        portage.prepare_build_dirs(self.settings["ROOT"], self.settings, 1)
                fetcher = BinpkgFetcher(background=self.background,
                        logfile=self.settings.get("PORTAGE_LOG_FILE"), pkg=self.pkg,