Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914159 - sys-apps/portage: use "binpkg" color for appropriate "Running pre-merge checks" messages
Summary: sys-apps/portage: use "binpkg" color for appropriate "Running pre-merge check...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, PullRequest
Depends on: 912676
Blocks:
  Show dependency tree
 
Reported: 2023-09-14 06:00 UTC by Michał Górny
Modified: 2023-10-03 15:39 UTC (History)
0 users

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


Attachments
hack.patch (file_914159.txt,1.41 KB, patch)
2023-09-14 07:27 UTC, Sam James
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-09-14 06:00:18 UTC
Right now Portage does source build-related progress messages in green, and binary package install messages in magenta.  However, all pre-merge checks are geren which is a bit confusing.  How about making that match build-type coloring as well?
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-14 07:11:20 UTC
Looks like we have 3 (really 2) choices:
>lib/_emerge/Package.py:564:                cpv_color = "PKG_BINARY_MERGE"
>lib/portage/output.py:158:_styles["PKG_BINARY_MERGE"] = ("purple",)
>lib/portage/output.py:159:_styles["PKG_BINARY_MERGE_SYSTEM"] = ("purple",)
>lib/portage/output.py:160:_styles["PKG_BINARY_MERGE_WORLD"] = ("fuchsia",)

Can you give me some screenshot just to save me some setup?
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-14 07:13:02 UTC
Oh, nevermind, sorry, I get it.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-14 07:27:03 UTC
Created attachment 870544 [details, diff]
hack.patch

Please try this untested patch.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-09-14 08:25:03 UTC
(In reply to Sam James from comment #3)
> Created attachment 870544 [details, diff] [details, diff]
> hack.patch
> 
> Please try this untested patch.

Yes, that looks good.  Thanks!
Comment 5 Larry the Git Cow gentoo-dev 2023-09-15 10:36:50 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=2e572b9edc48a6d4623df1c2c46ba34316f7e72a

commit 2e572b9edc48a6d4623df1c2c46ba34316f7e72a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-15 03:55:10 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-15 10:36:47 +0000

    elog: mod_echo: use binpkg coloring
    
    With the 'echo' elog module, we get messages like:
    ```
     * Messages for package X
     * Log file: /var/log/portage/build/[...]
    ```
    
    Colorize 'X' based on whether it's a binpkg or not, rather than always using
    green as if it was built from source.
    
    Bug: https://bugs.gentoo.org/914159
    Signed-off-by: Sam James <sam@gentoo.org>

 lib/portage/elog/mod_echo.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=f5081b7def54bc9e49aac117ce2b1ebc89379c79

commit f5081b7def54bc9e49aac117ce2b1ebc89379c79
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-15 04:00:32 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-15 10:36:47 +0000

    _emerge: use binpkg coloring for failures too
    
    Bug: https://bugs.gentoo.org/914159
    Signed-off-by: Sam James <sam@gentoo.org>

 lib/_emerge/Scheduler.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=7280f1b3dc19ae1be1cc7a930346127b1b7e7686

commit 7280f1b3dc19ae1be1cc7a930346127b1b7e7686
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-15 03:38:13 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-15 10:36:47 +0000

    _emerge: use binpkg coloring for pkg_pretend
    
    For the 'Running pre-merge checks' message, we write:
    ```
    >>> Running pre-merge checks for X
    ```
    
    X is currently always in green, while the emerge list above might have the atom
    X listed in purple if it's a binpkg.
    
    Change X to be colored based on if it's a binpkg or not.
    
    Bug: https://bugs.gentoo.org/914159
    Signed-off-by: Sam James <sam@gentoo.org>

 lib/_emerge/Scheduler.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Comment 6 Larry the Git Cow gentoo-dev 2023-10-03 15:39:18 UTC
The bug has been closed via the following commit(s):

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

commit 9f9211a35abef13079f93a96f57f3a96083c69a7
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-10-03 15:38:28 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-03 15:38:41 +0000

    sys-apps/portage: add 3.0.52
    
    Closes: https://bugs.gentoo.org/704866
    Closes: https://bugs.gentoo.org/877793
    Closes: https://bugs.gentoo.org/889300
    Closes: https://bugs.gentoo.org/900224
    Closes: https://bugs.gentoo.org/912676
    Closes: https://bugs.gentoo.org/912808
    Closes: https://bugs.gentoo.org/913070
    Closes: https://bugs.gentoo.org/913103
    Closes: https://bugs.gentoo.org/914159
    Closes: https://bugs.gentoo.org/915054
    Closes: https://bugs.gentoo.org/915119
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.52.ebuild | 235 +++++++++++++++++++++++++++++++++
 2 files changed, 236 insertions(+)