summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-22 22:32:08 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-22 22:32:08 +0000
commit831c05e73514da2b87d8381eac0df7c98f158c1d (patch)
tree54bec5a2030a6bd8caf6dd053d1e5d982391524a
parentdd0b780a0c77d791f36b5e384616d43a3c01fb2b (diff)
downloadportage-831c05e73514da2b87d8381eac0df7c98f158c1d.tar.gz
portage-831c05e73514da2b87d8381eac0df7c98f158c1d.tar.bz2
portage-831c05e73514da2b87d8381eac0df7c98f158c1d.zip
In depgraph.create(), if a direct circular dependency is
not an unsatisfied buildtime dependency then drop it here since otherwise it can skew the merge order calculation in an unwanted way. svn path=/main/trunk/; revision=8233
-rw-r--r--pym/_emerge/__init__.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index f3fd95a4d..088dab630 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -1294,13 +1294,16 @@ class depgraph(object):
if existing_node:
e_type, myroot, e_cpv, e_status = existing_node
if mykey == e_cpv:
- # The existing node can be reused. It's okay for a
- # node to depend on itself here if priority.satisfied
- # is True, otherwise it is a circular dependency that
- # can not be ignored.
+ # The existing node can be reused.
self._parent_child_digraph.add(existing_node, myparent)
- self.digraph.addnode(existing_node, myparent,
- priority=priority)
+ # If a direct circular dependency is not an unsatisfied
+ # buildtime dependency then drop it here since otherwise
+ # it can skew the merge order calculation in an unwanted
+ # way.
+ if existing_node != myparent or \
+ (priority.buildtime and not priority.satisfied):
+ self.digraph.addnode(existing_node, myparent,
+ priority=priority)
return 1
else:
if jbigkey in self._slot_collision_nodes: