diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-03-24 21:32:38 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-03-24 21:32:38 -0700 |
commit | 3081e651fc3cd3a0729bb1fbe2e93fbc58dcef0d (patch) | |
tree | 84c0c38f442d42c4352602070e16a07716a73772 /pym/portage/dbapi/_MergeProcess.py | |
parent | f823031ed33bda9579d265b62607380bb255dfdd (diff) | |
download | portage-3081e651fc3cd3a0729bb1fbe2e93fbc58dcef0d.tar.gz portage-3081e651fc3cd3a0729bb1fbe2e93fbc58dcef0d.tar.bz2 portage-3081e651fc3cd3a0729bb1fbe2e93fbc58dcef0d.zip |
MergeProcess: Fix PORTAGE_BACKGROUND/LOG_FILE use
In this subprocess we don't want PORTAGE_BACKGROUND to suppress
stdout/stderr output since they are pipes. We also don't want to open
PORTAGE_LOG_FILE, since it will already be opened by the parent
process, so we set the PORTAGE_BACKGROUND="subprocess" value for use
in conditional logging code involving PORTAGE_LOG_FILE.
Diffstat (limited to 'pym/portage/dbapi/_MergeProcess.py')
-rw-r--r-- | pym/portage/dbapi/_MergeProcess.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py index 6e63f84fd..a8c3c9dc7 100644 --- a/pym/portage/dbapi/_MergeProcess.py +++ b/pym/portage/dbapi/_MergeProcess.py @@ -85,6 +85,15 @@ class MergeProcess(SpawnProcess): # is triggered when mylink._scheduler is None. mylink._scheduler = None + # In this subprocess we don't want PORTAGE_BACKGROUND to + # suppress stdout/stderr output since they are pipes. We + # also don't want to open PORTAGE_LOG_FILE, since it will + # already be opened by the parent process, so we set the + # "subprocess" value for use in conditional logging code + # involving PORTAGE_LOG_FILE. + self.settings["PORTAGE_BACKGROUND"] = "subprocess" + self.settings.backup_changes("PORTAGE_BACKGROUND") + rval = 1 try: rval = mylink.merge(self.pkgloc, self.infloc, |