summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/depgraph.py17
-rw-r--r--pym/_emerge/main.py3
2 files changed, 18 insertions, 2 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index a75dfc1a7..36faee329 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -5486,7 +5486,22 @@ class _dep_check_composite_db(dbapi):
# that are usually ignored in visibility checks for
# installed packages, in order to handle cases like
# bug #350285.
- return False
+ myopts = self._depgraph._frozen_config.myopts
+ use_ebuild_visibility = myopts.get(
+ '--use-ebuild-visibility', 'n') != 'n'
+ usepkgonly = "--usepkgonly" in myopts
+ if not use_ebuild_visibility and usepkgonly:
+ return False
+ else:
+ try:
+ pkg_eb = self._depgraph._pkg(
+ pkg.cpv, "ebuild", pkg.root_config, myrepo=pkg.repo)
+ except portage.exception.PackageNotFound:
+ return False
+ else:
+ if not self._depgraph._pkg_visibility_check(pkg_eb):
+ return False
+
in_graph = self._depgraph._dynamic_config._slot_pkg_map[
self._root].get(pkg.slot_atom)
if in_graph is None:
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 76cf031e2..912fab51b 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -937,7 +937,8 @@ def parse_opts(tmpcmdline, silent=False):
if myoptions.use_ebuild_visibility in true_y:
myoptions.use_ebuild_visibility = True
else:
- myoptions.use_ebuild_visibility = None
+ # None or "n"
+ pass
if myoptions.usepkg in true_y:
myoptions.usepkg = True