commit:     b199d0307b47f9fb06dbe533d7e24926a561c238
Author:     Oskari Pirhonen <xxc3ncoredxx <AT> gmail <DOT> com>
AuthorDate: Sun Jul  9 05:08:27 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jul  9 06:24:28 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=b199d030

depgraph.py: fix "no ebuilds/binpkgs" message

The "there are no binary packages to satisfy" was being unconditionally
output for packages that could not be found. Fix the logic for choosing
between the "binary packages" and "ebuilds" form of the message.

This is a temporary stopgap as alluded to by me in the bug, but the
tl;dr is that some entries in the `myopts` dict have "y"/"n" values
whereas some are True/unset, and this discrepancy should be sorted out.

[sam: Add NEWS and Fixes, although the change in that commit _shouldn't_
have been wrong, it is because of a quirk for now...]

Bug: https://bugs.gentoo.org/909853
Signed-off-by: Oskari Pirhonen <xxc3ncoredxx <AT> gmail.com>
Closes: https://github.com/gentoo/portage/pull/1065
Fixes: 0b21a5a392bd84c07b94373991f59108fbe98516
Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                    | 3 +++
 lib/_emerge/depgraph.py | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index d40c309cd..fe59a1ddf 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ Bug fixes:
 * install-qa-check.d/05prefix: Fix prefixifying shebang for >= EAPI 7 ebuilds
   (bug #909147).
 
+* emerge: Fix 'no ebuilds available' message always mentioning binpkgs
+  (bug #909853).
+
 * gpkg: Fix timestamp for binary packages (bug #909067).
 
 portage-3.0.49 (2023-06-21)

diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index a36ab6351..1aeae6257 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -6456,7 +6456,7 @@ class depgraph:
                     cp_exists = True
                     break
 
-            if self._frozen_config.myopts.get("--usepkgonly", "y"):
+            if self._frozen_config.myopts.get("--usepkgonly", False):
                 writemsg(
                     f"\nemerge: there are no binary packages to satisfy 
{green(xinfo)}.\n",
                     noiselevel=-1,

Reply via email to