summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-10-09 20:28:30 +0000
committerZac Medico <zmedico@gentoo.org>2009-10-09 20:28:30 +0000
commit5faa8b31f5f34527a627acfe77b1d6715ac4ce76 (patch)
treec68ffa8ddae639cfbf713d8cd73e5d8dfc88f9a9
parentAdd a --color < y | n > option so that color output can be forced. This is (diff)
downloadportage-multirepo-5faa8b31f5f34527a627acfe77b1d6715ac4ce76.tar.gz
portage-multirepo-5faa8b31f5f34527a627acfe77b1d6715ac4ce76.tar.bz2
portage-multirepo-5faa8b31f5f34527a627acfe77b1d6715ac4ce76.zip
Force consistent color output, in case we are capturing fetch
output through a normal pipe due to unavailability of ptys. Thanks to grobian for reporting. svn path=/main/trunk/; revision=14530
-rw-r--r--pym/_emerge/EbuildFetcher.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/_emerge/EbuildFetcher.py b/pym/_emerge/EbuildFetcher.py
index 228d15bb..ba282081 100644
--- a/pym/_emerge/EbuildFetcher.py
+++ b/pym/_emerge/EbuildFetcher.py
@@ -66,6 +66,11 @@ class EbuildFetcher(SpawnProcess):
if debug:
fetch_args.append("--debug")
+ if not self.background and nocolor not in ('yes', 'true'):
+ # Force consistent color output, in case we are capturing fetch
+ # output through a normal pipe due to unavailability of ptys.
+ fetch_args.append('--color=y')
+
self.args = fetch_args
self.env = fetch_env
SpawnProcess._start(self)