Make EbuildFetcher always disable color in prefetch mode, since
authorZac Medico <zmedico@gentoo.org>
Thu, 9 Sep 2010 17:09:39 +0000 (10:09 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 9 Sep 2010 17:09:39 +0000 (10:09 -0700)
prefetch output always goes to a log.

pym/_emerge/EbuildFetcher.py

index bbae6a6a1ff4a91efa72e4fb94814ce3ee2b0d5a..87c82db586051aa1b02c617169cf601d6a8b3647 100644 (file)
@@ -64,6 +64,12 @@ class EbuildFetcher(SpawnProcess):
                fetch_env['PORTAGE_CONFIGROOT'] = settings['PORTAGE_CONFIGROOT']
 
                nocolor = settings.get("NOCOLOR")
+
+               if self.prefetch:
+                       # prefetch always outputs to a log, so
+                       # always disable color
+                       nocolor = "true"
+
                if nocolor is not None:
                        fetch_env["NOCOLOR"] = nocolor