Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 902551 - app-portage/gentoolkit: Support the NO_COLOR environment variable
Summary: app-portage/gentoolkit: Support the NO_COLOR environment variable
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
URL: https://no-color.org/
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2023-03-21 17:03 UTC by Ulrich Müller
Modified: 2023-10-03 15:44 UTC (History)
2 users (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 Ulrich Müller gentoo-dev 2023-03-21 17:03:41 UTC
The new quasi-standard for disabling ANSI color is to check for the NO_COLOR environment variable and disable color when the variable has a nonempty value.

See https://no-color.org/:
"Command-line software which adds ANSI color to its output by default should check for a NO_COLOR environment variable that, when present and not an empty string (regardless of its value), prevents the addition of ANSI color."

Support for this was recently added to Portage itself, see bug 898224. Pkgcore supports it since 2021.
Comment 1 Larry the Git Cow gentoo-dev 2023-03-22 03:36:40 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=1b82c21ec8897da285728f9e99e135fbd7406462

commit 1b82c21ec8897da285728f9e99e135fbd7406462
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-03-21 17:05:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-03-22 03:36:35 +0000

    Support the NO_COLOR environment variable
    
    Bug: https://bugs.gentoo.org/902551
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>
    Closes: https://github.com/gentoo/gentoolkit/pull/26
    Signed-off-by: Sam James <sam@gentoo.org>

 bin/revdep-rebuild.sh               | 18 ++++++++++--------
 man/revdep-rebuild.1                |  2 +-
 pym/gentoolkit/base.py              |  8 ++++++--
 pym/gentoolkit/eclean/cli.py        |  8 +++++---
 pym/gentoolkit/ekeyword/ekeyword.py |  7 +++++--
 pym/gentoolkit/equery/__init__.py   |  4 ++--
 6 files changed, 29 insertions(+), 18 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2023-10-03 15:44:46 UTC
The bug has been closed via the following commit(s):

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

commit c162ce62447fec711a28ecf1434879256c8aea6a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-10-03 15:43:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-03 15:44:35 +0000

    app-portage/gentoolkit: add 0.6.2
    
    Bug: https://bugs.gentoo.org/900224
    Closes: https://bugs.gentoo.org/369581
    Closes: https://bugs.gentoo.org/382009
    Closes: https://bugs.gentoo.org/576224
    Closes: https://bugs.gentoo.org/709816
    Closes: https://bugs.gentoo.org/861116
    Closes: https://bugs.gentoo.org/877519
    Closes: https://bugs.gentoo.org/902551
    Signed-off-by: Sam James <sam@gentoo.org>

 app-portage/gentoolkit/Manifest                |  1 +
 app-portage/gentoolkit/gentoolkit-0.6.2.ebuild | 71 ++++++++++++++++++++++++++
 2 files changed, 72 insertions(+)