summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-10-04 05:40:27 +0000
committerZac Medico <zmedico@gentoo.org>2008-10-04 05:40:27 +0000
commitd08b6f1567b7b556b4e6fdac6c5e1f3f05aacaa5 (patch)
tree4631b8cfef4c1e01564b6572953723131073c68a
parent91b76333c00c38c1b08c9e6ec1c3500d01f85aae (diff)
downloadportage-d08b6f1567b7b556b4e6fdac6c5e1f3f05aacaa5.tar.gz
portage-d08b6f1567b7b556b4e6fdac6c5e1f3f05aacaa5.tar.bz2
portage-d08b6f1567b7b556b4e6fdac6c5e1f3f05aacaa5.zip
Fix depgraph._add_pkg() to ensure that the existing package in the graph
matches the required atom in cases when a different package has been passed in. This solves a problem with silently unsatisfied USE deps that was reported by Jorge Manuel B. S. Vicetto <jmbsvicetto@g.o>. Now the unsatisfied dependency will result in a "slot conflict" rather than be silently ignored. svn path=/main/trunk/; revision=11618
-rw-r--r--pym/_emerge/__init__.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 5139c3c43..96f3c2aa9 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -4494,7 +4494,16 @@ class depgraph(object):
existing_node = self._slot_pkg_map[pkg.root].get(pkg.slot_atom)
slot_collision = False
if existing_node:
- if pkg.cpv == existing_node.cpv:
+ existing_node_matches = pkg.cpv == existing_node.cpv
+ if existing_node_matches and \
+ pkg != existing_node and \
+ dep.atom is not None:
+ # Use package set for matching since it will match via
+ # PROVIDE when necessary, while match_from_list does not.
+ atom_set = InternalPackageSet(initial_atoms=[dep.atom])
+ if not atom_set.findAtomForPackage(existing_node):
+ existing_node_matches = False
+ if existing_node_matches:
# The existing node can be reused.
if args:
for arg in args: