summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-14 10:21:45 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-14 10:21:45 -0700
commit9ab41d17caa3a64113fee953b7e4bdb9937087af (patch)
treecd01d119518c36b78fdcd528f395e808251d2e92 /pym
parent1b327184aa99e79b2b579819984d62319c022c58 (diff)
downloadportage-9ab41d17caa3a64113fee953b7e4bdb9937087af.tar.gz
portage-9ab41d17caa3a64113fee953b7e4bdb9937087af.tar.bz2
portage-9ab41d17caa3a64113fee953b7e4bdb9937087af.zip
When in background mode, set NOCOLOR=true in order to prevent color
codes from showing up in logs, since we're not displaying to a terminal anyway. Thanks to Brian Harring for the suggestion.
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/AbstractEbuildProcess.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/_emerge/AbstractEbuildProcess.py b/pym/_emerge/AbstractEbuildProcess.py
index 0dec65036..de120e8ad 100644
--- a/pym/_emerge/AbstractEbuildProcess.py
+++ b/pym/_emerge/AbstractEbuildProcess.py
@@ -33,6 +33,11 @@ class AbstractEbuildProcess(SpawnProcess):
def _start(self):
+ if self.background:
+ # Automatically prevent color codes from showing up in logs,
+ # since we're not displaying to a terminal anyway.
+ self.settings['NOCOLOR'] = 'true'
+
if self.phase not in self._phases_without_builddir:
self.settings['PORTAGE_IPC_DAEMON'] = "1"
self._exit_command = ExitCommand()