From d08b6f1567b7b556b4e6fdac6c5e1f3f05aacaa5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 4 Oct 2008 05:40:27 +0000 Subject: 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 . Now the unsatisfied dependency will result in a "slot conflict" rather than be silently ignored. svn path=/main/trunk/; revision=11618 --- pym/_emerge/__init__.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pym/_emerge') 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: -- cgit v1.2.3-1-g7c22