commit:     7280f1b3dc19ae1be1cc7a930346127b1b7e7686
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 15 03:38:13 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=7280f1b3

_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 <AT> gentoo.org>

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

diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py
index ece3f27f7c..db9615d406 100644
--- a/lib/_emerge/Scheduler.py
+++ b/lib/_emerge/Scheduler.py
@@ -865,12 +865,13 @@ class Scheduler(PollScheduler):
             if self._terminated_tasks:
                 raise asyncio.CancelledError
 
-            out_str = "Running pre-merge checks for " + colorize("INFORM", 
x.cpv)
-            self._status_msg(out_str)
-
             root_config = x.root_config
             settings = self._allocate_config(root_config.root)
             settings.setcpv(x)
+
+            color = "PKG_BINARY_MERGE" if x.built else "INFORM"
+            self._status_msg(f"Running pre-merge checks for {colorize(color, 
x.cpv)}")
+
             if not x.built:
                 # Get required SRC_URI metadata (it's not cached in x.metadata
                 # because some packages have an extremely large SRC_URI value).

Reply via email to