summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/AbstractEbuildProcess.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-03-24 21:32:38 -0700
committerZac Medico <zmedico@gentoo.org>2011-03-24 21:32:38 -0700
commit3081e651fc3cd3a0729bb1fbe2e93fbc58dcef0d (patch)
tree84c0c38f442d42c4352602070e16a07716a73772 /pym/_emerge/AbstractEbuildProcess.py
parentf823031ed33bda9579d265b62607380bb255dfdd (diff)
downloadportage-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/_emerge/AbstractEbuildProcess.py')
-rw-r--r--pym/_emerge/AbstractEbuildProcess.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/_emerge/AbstractEbuildProcess.py b/pym/_emerge/AbstractEbuildProcess.py
index d7f31be28..39c613bfe 100644
--- a/pym/_emerge/AbstractEbuildProcess.py
+++ b/pym/_emerge/AbstractEbuildProcess.py
@@ -225,8 +225,10 @@ class AbstractEbuildProcess(SpawnProcess):
msg = _unicode_decode(out.getvalue(),
encoding=_encodings['content'], errors='replace')
if msg:
- self.scheduler.output(msg,
- log_path=self.settings.get("PORTAGE_LOG_FILE"))
+ log_path = None
+ if self.settings.get("PORTAGE_BACKGROUND") != "subprocess":
+ log_path = self.settings.get("PORTAGE_LOG_FILE")
+ self.scheduler.output(msg, log_path=log_path)
def _log_poll_exception(self, event):
self._elog("eerror",