Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 274279 - sys-apps/portage - some text output cannot be colorized differently via /etc/portage/color.map
Summary: sys-apps/portage - some text output cannot be colorized differently via /etc/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 210077 288499
  Show dependency tree
 
Reported: 2009-06-15 20:03 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2009-10-11 00:48 UTC (History)
1 user (show)

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


Attachments
Patch for portage.output to fix some bugs/add requested feature (portage-output-try-to-fix-the-mess.patch,13.78 KB, patch)
2009-06-16 13:06 UTC, Sebastian Luther (few)
Details | Diff
Patch for portage.output to fix some bugs/add requested feature (portage-output-try-to-fix-the-mess.patch,12.43 KB, patch)
2009-06-16 20:33 UTC, Sebastian Luther (few)
Details | Diff
Patch for portage.output to fix some bugs/add requested feature (portage-output-try-to-fix-the-mess.patch,13.13 KB, patch)
2009-06-16 21:01 UTC, Sebastian Luther (few)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-06-15 20:03:51 UTC
Hi,

as already mentioned in #-portage I tried to change all text output which is colorized in yellow by default to get printed in purple color. So I created the file /etc/portage/color.map with the following content:

  yellow=purple

This turns most yellow text output into purple but not everything. For example the output of

  >>> Emerging (1 of 5) media-libs/ilmbase-1.0.1

still has the numbers in "(1 of 5)" printed in yellow color.

Marking this bug as minor since it doesn't break functionality in portage.

P.S.: setting 'MERGE_LIST_PROGRESS = "purple"' in color.map turns the remaining yellow text output into purple as well...

Reproducible: Always

Steps to Reproduce:
Comment 1 Sebastian Luther (few) 2009-06-16 13:06:51 UTC
Created attachment 194878 [details, diff]
Patch for portage.output to fix some bugs/add requested feature

FIX: Syntax error in color.map makes every user of portage.output irrecoverably crash.
FIX: Allow multiple tokens on the rhs in color.map like the man page says.
FIX: Add missing attributes to man page
FEATURE: allow attributes to be overridden in color.map
Comment 2 Zac Medico gentoo-dev 2009-06-16 19:12:37 UTC
(In reply to comment #1)
> Created an attachment (id=194878) [edit]
> Patch for portage.output to fix some bugs/add requested feature

Patch looks pretty good. The only problem I noticed was that it doesn't ignore comment lines (starting with #) like the shlex parser does.

> FIX: Allow multiple tokens on the rhs in color.map like the man page says.
> FIX: Add missing attributes to man page

Then man page changes are in svn now. I'll commit the rest after the comment issue is fixed.

Comment 3 Sebastian Luther (few) 2009-06-16 20:33:27 UTC
Created attachment 194930 [details, diff]
Patch for portage.output to fix some bugs/add requested feature

-removed some debug output
-patch against revision 13642
Comment 4 Sebastian Luther (few) 2009-06-16 21:01:21 UTC
Created attachment 194938 [details, diff]
Patch for portage.output to fix some bugs/add requested feature

-re-add the ability to assign ansi code patterns to variables (it worked for attributes and it worked without ths patch)
-document the ability to assign ansi code patterns
-remove remaining debug output
Comment 5 Sebastian Luther (few) 2009-06-16 21:03:14 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Created an attachment (id=194878) [edit]
> > Patch for portage.output to fix some bugs/add requested feature

> Patch looks pretty good. The only problem I noticed was that it doesn't ignore
> comment lines (starting with #) like the shlex parser does.

This works here (in all versions of the patch).

+			commenter_pos = line.find("#")
+			line = line[:commenter_pos].strip()

is supposed to do it.
Comment 6 Zac Medico gentoo-dev 2009-06-16 21:53:51 UTC
(In reply to comment #4)
> Created an attachment (id=194938) [edit]
> Patch for portage.output to fix some bugs/add requested feature

Thanks, that's in svn r13643.
Comment 7 Zac Medico gentoo-dev 2009-08-03 23:06:24 UTC
This is fixed in 2.2_rc34.
Comment 8 Zac Medico gentoo-dev 2009-10-11 00:48:41 UTC
This is fixed in 2.1.7.