diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-01-04 16:52:32 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-01-04 17:04:05 -0800 |
commit | 3dbd7e8e025fb068a8e1abe27728991486640483 (patch) | |
tree | ac714ba8b2601560ae96a850032b4fc8d2facd2c | |
parent | dep_zapdeps: add other_installed_some choice bin (diff) | |
download | portage-3dbd7e8e025fb068a8e1abe27728991486640483.tar.gz portage-3dbd7e8e025fb068a8e1abe27728991486640483.tar.bz2 portage-3dbd7e8e025fb068a8e1abe27728991486640483.zip |
composite_db: use ebuild visibility for installed
This will fix bug #350488.
-rw-r--r-- | pym/_emerge/depgraph.py | 17 | ||||
-rw-r--r-- | 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 |