From 3081e651fc3cd3a0729bb1fbe2e93fbc58dcef0d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 24 Mar 2011 21:32:38 -0700 Subject: 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. --- pym/_emerge/AbstractEbuildProcess.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pym/_emerge/AbstractEbuildProcess.py') 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", -- cgit v1.2.3-1-g7c22