summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-13 19:17:34 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-13 19:17:34 +0000
commit1008e73d6eaac9496ebbb17a75a13389390e323e (patch)
tree7fd1d943206d7124f69ef7fdd75863e5e59ecfd6
parent813c7b6b0f05a0d1a15c3e8f3c1ce08fc2c253a7 (diff)
downloadportage-1008e73d6eaac9496ebbb17a75a13389390e323e.tar.gz
portage-1008e73d6eaac9496ebbb17a75a13389390e323e.tar.bz2
portage-1008e73d6eaac9496ebbb17a75a13389390e323e.zip
Fix the _dep_check_composite_db visibility filtering some more.
svn path=/main/trunk/; revision=9872
-rw-r--r--pym/_emerge/__init__.py27
1 files changed, 18 insertions, 9 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 3e8b67bf8..f29bdc9a1 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -4366,21 +4366,17 @@ class depgraph(object):
continue
slots.add(graph_db.aux_get(cpv, ["SLOT"])[0])
ret = []
+ if self._visible(pkg):
+ self._cpv_pkg_map[pkg.cpv] = pkg
+ ret.append(pkg.cpv)
+ slots.remove(pkg.metadata["SLOT"])
while slots:
slot_atom = "%s:%s" % (atom_cp, slots.pop())
pkg, existing = self._depgraph._select_package(
self._root, slot_atom)
if not pkg:
continue
- if pkg.installed and "selective" not in self._depgraph.myparams:
- try:
- arg = self._depgraph._iter_atoms_for_pkg(pkg).next()
- except (StopIteration, portage.exception.InvalidDependString):
- arg = None
- if arg:
- continue
- if pkg.installed and \
- not visible(self._depgraph.pkgsettings[pkg.root], pkg):
+ if not self._visible(pkg):
continue
self._cpv_pkg_map[pkg.cpv] = pkg
ret.append(pkg.cpv)
@@ -4389,6 +4385,19 @@ class depgraph(object):
self._match_cache[orig_atom] = ret
return ret[:]
+ def _visible(self, pkg):
+ if pkg.installed and "selective" not in self._depgraph.myparams:
+ try:
+ arg = self._depgraph._iter_atoms_for_pkg(pkg).next()
+ except (StopIteration, portage.exception.InvalidDependString):
+ arg = None
+ if arg:
+ return False
+ if pkg.installed and \
+ not visible(self._depgraph.pkgsettings[pkg.root], pkg):
+ return False
+ return True
+
def _dep_expand(self, atom):
"""
This is only needed for old installed packages that may