dblink.unmerge: init log_path earlier, don't pop
authorZac Medico <zmedico@gentoo.org>
Fri, 3 Jun 2011 02:35:05 +0000 (19:35 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 3 Jun 2011 02:35:05 +0000 (19:35 -0700)
There's no need to pop PORTAGE_LOG_FILE here, since
PORTAGE_BACKGROUND=subprocess disables logging when necessary.

pym/portage/dbapi/vartree.py

index e742358dc782ab07aa2321133d8c4f94627c051b..3c7e9345fb6234e0d9a705b1829f5f013f857e8b 100644 (file)
@@ -1619,7 +1619,7 @@ class dblink(object):
                                DeprecationWarning, stacklevel=2)
 
                background = False
-               log_path = None
+               log_path = self.settings.get("PORTAGE_LOG_FILE")
                if self._scheduler is None:
                        # We create a scheduler instance and use it to
                        # log unmerge output separately from merge output.
@@ -1629,9 +1629,6 @@ class dblink(object):
                                self.settings["PORTAGE_BACKGROUND"] = "1"
                                self.settings.backup_changes("PORTAGE_BACKGROUND")
                                background = True
-                       else:
-                               # Our output is redirected and logged by the parent process.
-                               log_path = self.settings.pop("PORTAGE_LOG_FILE", None)
                elif self.settings.get("PORTAGE_BACKGROUND") == "1":
                        background = True