Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 651546 - app-portage/portage-utils: broken color output with color.map - Usage: q ightgray<applet> <args>ellow : invoke a portage utility applet
Summary: app-portage/portage-utils: broken color output with color.map - Usage: q ight...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-03-26 08:35 UTC by Pavel Balaev
Modified: 2018-04-05 19:02 UTC (History)
1 user (show)

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


Attachments
Patch that adds color=color format support (colors.patch,1.27 KB, patch)
2018-03-26 08:35 UTC, Pavel Balaev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Balaev 2018-03-26 08:35:48 UTC
Created attachment 525454 [details, diff]
Patch that adds color=color format support

affected versions: all
step to reproduce:

* create file /etc/portage/color.map
* use color=color settings:
blue=lightgray
red=yellow
darkblue=teal

output will be:

$ q
Usage: q ightgray<applet> <args>ellow  : invoke a portage utility applet

Currently defined applets:
        q ightgray<applet> <args> ellow: virtual applet
    qatom ightgray<pkg>           ellow: split atom strings
   qcache ightgray<action> <args> ellow: search the metadata cache
   qcheck ightgray<pkgname>       ellow: verify integrity of installed packages
Comment 1 Fabian Groffen gentoo-dev 2018-03-26 08:52:36 UTC
I'll have a look at your patch in detail later, I see it indeed doesn't grok the color=color syntax.
Comment 2 Larry the Git Cow gentoo-dev 2018-03-26 18:41:05 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=09dad6bdeb1e750ce0bbb25c6123f3ad23ca3d3a

commit 09dad6bdeb1e750ce0bbb25c6123f3ad23ca3d3a
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2018-03-26 18:40:43 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2018-03-26 18:40:43 +0000

    colors: add support for color=color mappings
    
    This patch is based on the work by Pavel Balaev <pascal@unixdev.ru>.
    
    Add support for color=color mappings.  While at it, make color remapping
    independent of the order in which they are defined in color.map.
    
    Bug: https://bugs.gentoo.org/651546

 libq/colors.c | 65 ++++++++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 44 insertions(+), 21 deletions(-)}
Comment 3 Fabian Groffen gentoo-dev 2018-03-26 18:43:30 UTC
Thanks, I made some changes to your patch, mostly fixing redefinitions when defining things like:

red=yellow
blue=red

(making blue yellow).
Comment 4 Pavel Balaev 2018-03-26 19:16:20 UTC
Thanks for the quick response!
Comment 5 Larry the Git Cow gentoo-dev 2018-04-05 19:02:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34b636503cc7dcabe32b9b377c2eb77cb5fd5575

commit 34b636503cc7dcabe32b9b377c2eb77cb5fd5575
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2018-04-05 19:02:10 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2018-04-05 19:02:34 +0000

    app-portage/portage-utils: version bump to 0.70
    
    This release fixes multiple bugs lingering around for a while.
    
    Closes: https://bugs.gentoo.org/651546
    Closes: https://bugs.gentoo.org/646310
    Closes: https://bugs.gentoo.org/645554
    Closes: https://bugs.gentoo.org/643820
    Closes: https://bugs.gentoo.org/638032
    Closes: https://bugs.gentoo.org/608960
    Closes: https://bugs.gentoo.org/607498
    Closes: https://bugs.gentoo.org/558306
    Closes: https://bugs.gentoo.org/526596
    Closes: https://bugs.gentoo.org/470168
    Closes: https://bugs.gentoo.org/351100
    Closes: https://bugs.gentoo.org/335453
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-portage/portage-utils/Manifest                 |  2 +-
 .../portage-utils/portage-utils-0.62.ebuild        |  2 +-
 .../portage-utils/portage-utils-0.63.ebuild        | 43 ----------------------
 ...ls-0.64-r1.ebuild => portage-utils-0.70.ebuild} | 16 +-------
 4 files changed, 4 insertions(+), 59 deletions(-)