commit:     add3a5e69835c8e2c79dc33fef03c2c779727169
Author:     Greg Kubaryk <greg.kubaryk <AT> gmail <DOT> com>
AuthorDate: Wed Mar  4 23:33:46 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar  4 23:39:36 2026 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=add3a5e6

Implement --verbose-missing-ebuilds

kurly reported that users often have older sys-kernel/gentoo-sources slots in
their world file. These don't have any slot operator deps so aren't as big of
a problem as other packages.

We could exclude packages if they're in world but no ebuilds are available
unless they have slot operator deps.

But I'm not sure this heuristic is great: if we replace a dependency and
the replacement conflicts with the old one, we'll still have problems, so
go for the simplest option of having an option to suppress these notices
with --verbose-missing-ebuilds being default-on, and users can turn it
off if they wish.

[sam: Add emerge(1) docs; write commit message.]

Closes: https://bugs.gentoo.org/970691
Signed-off-by: Greg Kubaryk <greg.kubaryk <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/_emerge/depgraph.py | 4 +++-
 lib/_emerge/main.py     | 5 +++++
 man/emerge.1            | 4 ++++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 5d98882296..22e481af90 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -5375,7 +5375,9 @@ class depgraph:
                     # If we're emerging @selected or @world, we want to loudly 
warn about
                     # no ebuilds being available for packages (bug #911180).
                     if (
-                        pkg
+                        
self._frozen_config.myopts.get("--verbose-missing-ebuilds", "y")
+                        != "n"
+                        and pkg
                         and pkg.installed
                         and pkg.operation == "nomerge"
                         and isinstance(arg, SetArg)

diff --git a/lib/_emerge/main.py b/lib/_emerge/main.py
index b5ff354b45..85a76d0ded 100644
--- a/lib/_emerge/main.py
+++ b/lib/_emerge/main.py
@@ -187,6 +187,7 @@ def insert_optional_args(args):
         "--usepkgonly": y_or_n,
         "--usepkg-exclude-live": y_or_n,
         "--verbose": y_or_n,
+        "--verbose-missing-ebuilds": y_or_n,
         "--verbose-slot-rebuilds": y_or_n,
         "--with-test-deps": y_or_n,
     }
@@ -733,6 +734,10 @@ def parse_opts(tmpcmdline, silent=False):
             "help": "verbose output",
             "choices": true_y_or_n,
         },
+        "--verbose-missing-ebuilds": {
+            "help": "verbose missing ebuild output",
+            "choices": true_y_or_n,
+        },
         "--verbose-slot-rebuilds": {
             "help": "verbose slot rebuild output",
             "choices": true_y_or_n,

diff --git a/man/emerge.1 b/man/emerge.1
index 6cadec2fdf..b272867794 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -1137,6 +1137,10 @@ Symbol   Location        Meaning
 Make slot conflicts more verbose. Note that this may in some cases output
 hundreds of packages for slot conflicts.
 .TP
+.BR "\-\-verbose\-missing\-ebuilds [ y | n ]"
+Warn on packages in the world flie with no ebuild available, which can
+prevent subslot rebuilds.  The default is set to "y" (on).
+.TP
 .BR "\-\-verbose\-slot\-rebuilds [ y | n ]"
 Turns on/off the extra emerge output to list which packages are causing 
rebuilds.
 The default is set to "y" (on).

Reply via email to