From: Zac Medico Date: Fri, 3 Jun 2011 10:13:23 +0000 (-0700) Subject: dblink.unmerge: fix some background logic cases X-Git-Tag: v2.2.0_alpha38~34 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=efc19df1a18d39257fb76e7259798e041d7b8619;p=portage.git dblink.unmerge: fix some background logic cases --- diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py index b52c15868..78e1ecd67 100644 --- a/pym/portage/dbapi/_MergeProcess.py +++ b/pym/portage/dbapi/_MergeProcess.py @@ -217,9 +217,12 @@ class MergeProcess(SpawnProcess): # already be opened by the parent process, so we set the # "subprocess" value for use in conditional logging code # involving PORTAGE_LOG_FILE. - if not self.unmerge and self.settings.get("PORTAGE_BACKGROUND") == "1": + if not self.unmerge: # unmerge phases have separate logs - self.settings["PORTAGE_BACKGROUND_UNMERGE"] = "1" + if self.settings.get("PORTAGE_BACKGROUND") == "1": + self.settings["PORTAGE_BACKGROUND_UNMERGE"] = "1" + else: + self.settings["PORTAGE_BACKGROUND_UNMERGE"] = "0" self.settings.backup_changes("PORTAGE_BACKGROUND_UNMERGE") self.settings["PORTAGE_BACKGROUND"] = "subprocess" self.settings.backup_changes("PORTAGE_BACKGROUND") diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 11eaca302..889cb588a 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1629,6 +1629,9 @@ class dblink(object): self.settings["PORTAGE_BACKGROUND"] = "1" self.settings.backup_changes("PORTAGE_BACKGROUND") background = True + elif self.settings.get("PORTAGE_BACKGROUND_UNMERGE") == "0": + self.settings["PORTAGE_BACKGROUND"] = "0" + self.settings.backup_changes("PORTAGE_BACKGROUND") elif self.settings.get("PORTAGE_BACKGROUND") == "1": background = True