Make Binpkg call prepare_build_dirs() before trying to clean the old
authorZac Medico <zmedico@gentoo.org>
Sun, 22 Aug 2010 21:15:04 +0000 (14:15 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 22 Aug 2010 21:15:04 +0000 (14:15 -0700)
log, so PORTAGE_LOG_FILE is initialized.

pym/_emerge/Binpkg.py

index 878fcea6d386b8cbc29df2840f9369156a03f3bc..acc38d3cab6e0e306a12d42e1ed4edf90757b7e1 100644 (file)
@@ -92,11 +92,11 @@ class Binpkg(CompositeTask):
                pkg_count = self.pkg_count
                if not (self.opts.pretend or self.opts.fetchonly):
                        self._build_dir.lock()
+                       # Initialze PORTAGE_LOG_FILE (clean_log won't work without it).
+                       portage.prepare_build_dirs(self.settings["ROOT"], self.settings, 1)
                        # If necessary, discard old log so that we don't
                        # append to it.
                        self._build_dir.clean_log()
-                       # Initialze PORTAGE_LOG_FILE.
-                       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,
                        pretend=self.opts.pretend, scheduler=self.scheduler)