summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-29 22:26:53 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-29 22:26:53 +0000
commit57dd8b23ae2d51525cec671d098a2f1758e2358d (patch)
tree0066d3691d86a28a028ac4a604768f8cd1905577
parent6c4dd752f897a71814be6ebecbe37d4e3ca63b5a (diff)
downloadportage-57dd8b23ae2d51525cec671d098a2f1758e2358d.tar.gz
portage-57dd8b23ae2d51525cec671d098a2f1758e2358d.tar.bz2
portage-57dd8b23ae2d51525cec671d098a2f1758e2358d.zip
Inside depgraph.validate_blockers(), prevent false positives in PROVIDE
virtual blocker matches that can occur for packages for packages that don't actual have the appropriate value in PROVIDE (triggered by profile 'virtuals' settings). Thanks to Ned Ludd <solar@g.o> for reporting. svn path=/main/trunk/; revision=13248
-rw-r--r--pym/_emerge/__init__.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 0a0ab3414..4fa46dbc1 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -6754,10 +6754,15 @@ class depgraph(object):
final_db = self.mydbapi[myroot]
provider_virtual = False
- if blocker.cp in virtuals and \
+ if blocker.cp.startswith('virtual/') and \
not self._have_new_virt(blocker.root, blocker.cp):
provider_virtual = True
+ # Use this to check PROVIDE for each matched package
+ # when necessary.
+ atom_set = InternalPackageSet(
+ initial_atoms=[blocker.atom])
+
if provider_virtual:
atoms = []
for provider_entry in virtuals[blocker.cp]:
@@ -6768,13 +6773,17 @@ class depgraph(object):
else:
atoms = [blocker.atom]
- blocked_initial = []
+ blocked_initial = set()
for atom in atoms:
- blocked_initial.extend(initial_db.match_pkgs(atom))
+ for pkg in initial_db.match_pkgs(atom):
+ if atom_set.findAtomForPackage(pkg):
+ blocked_initial.add(pkg)
- blocked_final = []
+ blocked_final = set()
for atom in atoms:
- blocked_final.extend(final_db.match_pkgs(atom))
+ for pkg in final_db.match_pkgs(atom):
+ if atom_set.findAtomForPackage(pkg):
+ blocked_final.add(pkg)
if not blocked_initial and not blocked_final:
parent_pkgs = self._blocker_parents.parent_nodes(blocker)