commit: f5081b7def54bc9e49aac117ce2b1ebc89379c79 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Sep 15 04:00:32 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Sep 15 10:36:47 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f5081b7d
_emerge: use binpkg coloring for failures too Bug: https://bugs.gentoo.org/914159 Signed-off-by: Sam James <sam <AT> gentoo.org> lib/_emerge/Scheduler.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py index db9615d406..2d1872feba 100644 --- a/lib/_emerge/Scheduler.py +++ b/lib/_emerge/Scheduler.py @@ -1260,12 +1260,14 @@ class Scheduler(PollScheduler): and not mod_echo_output ): for mysettings, key, logentries in self._failed_pkgs_die_msgs: + color = "PKG_BINARY_MERGE" if pkg.built else "INFORM" + root_msg = "" if mysettings["ROOT"] != "/": root_msg = f" merged to {mysettings['ROOT']}" print() printer.einfo( - f"Error messages for package {colorize('INFORM', key)}{root_msg}:" + f"Error messages for package {colorize(color, key)}{root_msg}:" ) print() for phase in portage.const.EBUILD_PHASES: @@ -2001,7 +2003,10 @@ class Scheduler(PollScheduler): def _failed_pkg_msg(self, failed_pkg, action, preposition): pkg = failed_pkg.pkg - msg = f"{bad('Failed')} to {action} {colorize('INFORM', pkg.cpv)}" + + color = "PKG_BINARY_MERGE" if failed_pkg.pkg.built else "INFORM" + + msg = f"{bad('Failed')} to {action} {colorize(color, pkg.cpv)}" if pkg.root_config.settings["ROOT"] != "/": msg += f" {preposition} {pkg.root}"
