summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: