Make Binpkg clean the build dir immediately after locking it. This ensures
authorZac Medico <zmedico@gentoo.org>
Wed, 10 Dec 2008 08:16:14 +0000 (08:16 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 10 Dec 2008 08:16:14 +0000 (08:16 -0000)
that a new PORTAGE_LOG_FILE is created.

svn path=/main/trunk/; revision=12198

pym/_emerge/__init__.py

index 44107ee2088cc75b05b807fc41d56138b24c17c9..632765490e8580c5ee9eb0c9c2d4586780dfc03d 100644 (file)
@@ -3186,6 +3186,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,