summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-06-03 03:13:23 -0700
committerZac Medico <zmedico@gentoo.org>2011-06-03 03:13:23 -0700
commitefc19df1a18d39257fb76e7259798e041d7b8619 (patch)
treec8561fcc172ea018223a0c5bbe31a81eb11298cf
parent7e4de7782079b4030e8f19582204f500bf9c4902 (diff)
downloadportage-efc19df1a18d39257fb76e7259798e041d7b8619.tar.gz
portage-efc19df1a18d39257fb76e7259798e041d7b8619.tar.bz2
portage-efc19df1a18d39257fb76e7259798e041d7b8619.zip
dblink.unmerge: fix some background logic cases
-rw-r--r--pym/portage/dbapi/_MergeProcess.py7
-rw-r--r--pym/portage/dbapi/vartree.py3
2 files changed, 8 insertions, 2 deletions
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