summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-06 18:53:21 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-06 18:53:21 +0000
commitb8a9917457b6f81108689b674f5f7a7f22e49ca7 (patch)
tree284ecafb886357b09da5cf939290504e6cb6cfb1
parent255a7267d2b4541e20569bb86c77676507b2f480 (diff)
downloadportage-b8a9917457b6f81108689b674f5f7a7f22e49ca7.tar.gz
portage-b8a9917457b6f81108689b674f5f7a7f22e49ca7.tar.bz2
portage-b8a9917457b6f81108689b674f5f7a7f22e49ca7.zip
Fix the CompositDbapi.match() logic wrt "selective" behavior and installed
packages so that it correctly handles false argument matches due to PROVIDE when a corresponding new-style virtual exists. svn path=/main/trunk/; revision=9729
-rw-r--r--pym/_emerge/__init__.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index f40cf46cc..53f09e8d0 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -1443,13 +1443,22 @@ class CompositeDbapi(object):
else:
if pkg.installed and "selective" not in self._depgraph.myparams:
try:
- self._depgraph._iter_args_for_pkg(pkg).next()
- except StopIteration:
- pass
+ args = list(self._depgraph._iter_args_for_pkg(pkg))
except portage.exception.InvalidDependString:
- pass
- else:
- ret = []
+ args = []
+ for arg in args:
+ arg_cp = portage.dep_getkey(arg.atom)
+ if arg and arg_cp != pkg.cp:
+ # If this argument matches via PROVIDE but there is a
+ # new-style virtual available, then the argument does
+ # not really apply to this package.
+ virt_pkg, virt_existing = \
+ self._depgraph._select_package(self._root, arg_cp)
+ if virt_pkg and virt_pkg.cp == arg_cp:
+ arg = None
+ if arg:
+ ret = []
+ break
if ret is None:
self._cpv_tree_map[pkg.cpv] = \
self._depgraph.pkg_tree_map[pkg.type_name]