Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 433974 - app-portage/gentoolkit - add '--color' switch in utilities
Summary: app-portage/gentoolkit - add '--color' switch in utilities
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage Tools Team
Depends on:
Blocks: 346443
  Show dependency tree
Reported: 2012-09-05 00:09 UTC by trismarck
Modified: 2012-11-06 17:37 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description trismarck 2012-09-05 00:09:16 UTC

would it be possible to add a --color switch to programs like 'equery' inside the gentoolkit package, so, if the output of the program is redirected to a pipe, that program would properly encode coloring into the pipe?
equery list mc | less -r

This will currently display the output of the equery command without coloring the output.
Note that 'emerge' already has a '--color y' switch.

Related thread:
Comment 1 Brian Dolbec gentoo-dev 2012-09-06 06:20:22 UTC
Set the -N, switch to turn off pipe detection.  But that usually also changes the output, since output is usually quieted some for pipes as compared to normal output.  But using -N will turn colors back on.

equery -N list mc | less -r
Comment 2 trismarck 2012-09-06 13:59:23 UTC
Hi Brian,

this is the effect of the '--no-pipe' switch:

I'm using equery-
Comment 3 Brian Dolbec gentoo-dev 2012-09-06 14:24:58 UTC
Since you don't have it installed (equery default, search only installed pkgs) you need to add the -p switch for list so it searches the entire portage tree.

equery -N list -p mc | less -r
Comment 4 trismarck 2012-09-06 18:26:28 UTC
I know I don't have it installed, I just wanted to show you that colors are not working :) .
Comment 5 Brian Dolbec gentoo-dev 2012-09-07 02:41:02 UTC
Yes, we saw it wasn't.  We both wrongly thought the -N switch restored colors.

Anyway, Paul Varner fixed it today.  So if you use the the -N switch but don't want colors, you will need to also add the -C switch to turn them off.

fixed in commit:;a=commit;h=e2e77301eb234aecfa5160d0de7bfda7bbe38a64

You can get the change now by emerging gentoolkit-9999.

There are a few more small changes/bugfixes since -  Do not worry it will be too unstable, we have not yet started work on changes for -0.3.1.
Comment 6 Paul Varner (RETIRED) gentoo-dev 2012-09-07 14:51:35 UTC
Actually there is one unstable change in gentoolkit-9999.  revdep-rebuild is a new python version which can miss things.  To be safe, you can run which is the stable bash version of revdep-rebuild.  Other than that, gentoolkit-9999 is very close to the current stable version of gentoolkit.
Comment 7 Paul Varner (RETIRED) gentoo-dev 2012-11-06 17:37:20 UTC
Released in gentoolkit-