Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 78701 - /usr/bin/ebuild ignores NOCOLOR
Summary: /usr/bin/ebuild ignores NOCOLOR
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2005-01-19 10:50 UTC by Rob Cakebread (RETIRED)
Modified: 2006-03-11 14:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild.patch (ebuild.patch,464 bytes, patch)
2005-01-19 10:52 UTC, Rob Cakebread (RETIRED)
Details | Diff
output.patch (output.patch,244 bytes, patch)
2005-01-19 12:33 UTC, Rob Cakebread (RETIRED)
Details | Diff
i think the location of this processing should be in output.py (output.diff,621 bytes, text/plain)
2005-05-13 19:19 UTC, erik quanstrom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Cakebread (RETIRED) gentoo-dev 2005-01-19 10:50:32 UTC
The ebuild command always shows color, ignoring NOCOLOR in /etc/make.conf

Attached is a patch to fix this; not sure if this is the best way to go about it.
Comment 1 Rob Cakebread (RETIRED) gentoo-dev 2005-01-19 10:52:23 UTC
Created attachment 48980 [details, diff]
ebuild.patch
Comment 2 Rob Cakebread (RETIRED) gentoo-dev 2005-01-19 12:33:38 UTC
Created attachment 48992 [details, diff]
output.patch

I think output.py should always strip color when (not sys.stdout.isatty())
(this patch fixes that)

Most programs that import output.py usually do this anyways and should be the
default behaviour.

This would be a fix for most complaints about NOCOLOR because its usually
people using ebuild/emerge/repoman etc. from within an ide like vim, abeni etc.
(i.e. bug# 77566)
Comment 3 erik quanstrom 2005-05-13 19:19:24 UTC
Created attachment 58847 [details]
i think the location of this processing should be in output.py

this patch forces pym/output.py to nocolor() if sys.argv contains --nocolor or
the terminal is not capable of displaying color. 

perhaps the right way to do this is to have the argument processing defer to a
function in output.py to take care of the --nocolor option instead of the 
end-run around the normal argument procesing that i've done.
Comment 4 Jason Stubbs (RETIRED) gentoo-dev 2005-05-13 19:32:30 UTC
When is this actually useful? What color output is there from portage?
Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-09 21:23:16 UTC
ebuild CPV.ebuild digest will generate color and can be bad on terminals that 
don't support color ( craptastic telnet terminals fex ).

While I don't think it's a critical issue; just some junk in the terminal, the 
fix is quite trivial.
Comment 6 Zac Medico gentoo-dev 2006-02-23 09:49:39 UTC
This is in svn r2773 for release in 2.1_pre6.

(In reply to comment #3)
> i think the location of this processing should be in output.py

I'd rather keep a UI decision like this in bin/ebuild because I don't like the idea of the global sys.stdout.isatty() and NOCOLOR environment variable automatically affecting the output module internals.
Comment 7 Zac Medico gentoo-dev 2006-03-11 14:02:21 UTC
Released in 2.1_pre6.