The default color scheme provided by portage with the new USE= flag output is rather unreadable on a white background. Some usersmay prefer a white background. Or may to simply customize the portage on the local box. (probably bigest use) This patch offers a way to let the end user remap colors used by portage and friends that import portage/output It adds one global call on initial import but that is minimal and never seems to get sourced in more than one time no matter how many times the portage is imported. Tested with: strace -eopen -f -o woof -v python -c 'import portage; import portage' grep \"/usr/lib/portage/pym/output.py\" woof
Created attachment 81441 [details, diff] portage-color-remap.patch
Created attachment 81442 [details] Example: /etc/portage/color.map
*** Bug 63517 has been marked as a duplicate of this bug. ***
Thanks Zac. I never spotted bug #63517 before.
What I'd really like to see is a color mapping service that can be used be all console apps (regardless of language, bash included). I've described the idea in bug 120576#c5.
Created attachment 81472 [details, diff] colormap.c This should meet your requirements.
Zac, ping.
I'm working on something similar to portage-color-remap.patch but the config file will contain only color names and/or rgb values rather than the actual ansi color codes. The codes are an implementation detail that, imo, should be separate from the user's color map choices.
Created attachment 83869 [details, diff] color_map.patch This patch is compatible with portage-color-remap.patch and adds the ability to assign colors symbolically. For example, red can be mapped to 31;01m via 'fatal error', like this: 'fatal error'=31;01m red='fatal error'
This is in svn r3072.
Released in 2.1_pre8.
Very nice feature. I even got it to work after squinting at the patch for about 10 minutes. Now my question. I didn't find any documentation about this. Is there none? Or is it just so well hidden, that I didn't find it? I looked at "man emerge" and "man portage" and at some of the portage-manuals on the website.
(In reply to comment #12) > Very nice feature. I even got it to work after squinting at the patch for about > 10 minutes. > > Now my question. I didn't find any documentation about this. Is there none? Or > is it just so well hidden, that I didn't find it? Bad habit but docs tend to be an after thought. User contributed documentation is welcome.
*** Bug 147704 has been marked as a duplicate of this bug. ***
Great idea, but I think in addition to this you could also just make the default portage colours work for both black and white backgrounds.
This bug is in FIXED state. With color remapping you can set anything you want. WHITE/BLACK/PINK/CYAN/OTHER... So... What are you commenting on David?
You're right, my bug really wasn't a duplicate of this one. I should re-specify my bug.