From 3dbd7e8e025fb068a8e1abe27728991486640483 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 4 Jan 2011 16:52:32 -0800 Subject: [PATCH] composite_db: use ebuild visibility for installed This will fix bug #350488. --- pym/_emerge/depgraph.py | 17 ++++++++++++++++- pym/_emerge/main.py | 3 ++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index ac7f45239..46fca20d8 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -5411,7 +5411,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) + 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 5179097d6..e26aa6595 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 -- 2.26.2