Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 769929 - app-portage/portage-utils: allow forcing colours for applets
Summary: app-portage/portage-utils: allow forcing colours for applets
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: AMD64 Linux
: Lowest enhancement with 1 vote (vote)
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-10 21:50 UTC by Alexander Wessel
Modified: 2021-07-06 07:03 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Wessel 2021-02-10 21:50:50 UTC
glop can suppress color output using the -C option, and automatically suppresses output when it detects a stdout is a pipe. I would ask for the option to allow forcing color, using --color=y (to be consistent with emerge --color=y).

Without the option, for example, 

watch qlop -rt

which is quite handy to monitor the ETA of a long build, will not result in nice, colorful output, which is quite sad. ;)

I'm happy to provide a patch if you think merging it is less work, but I think this might be fairly trivial for someone already familiar with the codebase.

Reproducible: Always
Comment 1 Fabian Groffen gentoo-dev 2021-02-11 07:52:07 UTC
I actually wondered the same thing a while ago, we indeed need a global option to force colours.
Comment 2 Larry the Git Cow gentoo-dev 2021-05-10 09:15:59 UTC
The bug has been referenced in the following commit(s):

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

commit 03c2d27602bc94aaa1660da7b084d40a9cf70f5d
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2021-05-10 09:12:43 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2021-05-10 09:12:43 +0000

    main: add global option --color to force colour output
    
    allow override for colouring to be enabled, this reorganises the code a
    bit because argument handling is done by the applets, and not by the
    main process, e.g. total colour handling can unfortunately not be done
    in a single place.
    
    Bug: https://bugs.gentoo.org/769929
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 applets.h | 10 +++++++---
 main.c    | 23 +++++++++--------------
 2 files changed, 16 insertions(+), 17 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2021-07-06 07:03:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65b5ac4b8140f7ff1ab5c27af5c690288ec1419b

commit 65b5ac4b8140f7ff1ab5c27af5c690288ec1419b
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2021-07-06 07:03:02 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2021-07-06 07:03:15 +0000

    app-portage/portage-utils-0.92: version bump + cleanup
    
    Closes: https://bugs.gentoo.org/792273
    Closes: https://bugs.gentoo.org/791571
    Closes: https://bugs.gentoo.org/787089
    Closes: https://bugs.gentoo.org/769929
    Closes: https://bugs.gentoo.org/757540
    Package-Manager: Portage-3.0.20, Repoman-3.0.2
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 app-portage/portage-utils/Manifest                 |  3 +-
 .../portage-utils/portage-utils-0.90.1.ebuild      | 67 ----------------------
 ...utils-0.91.ebuild => portage-utils-0.92.ebuild} |  0
 3 files changed, 1 insertion(+), 69 deletions(-)