From e6a9e130e4f75d86d23744b4e78c63e54c390d3c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 25 Jul 2006 04:57:38 +0000 Subject: [PATCH] Move the self dependency check from digraph.addnode() to depgraph.create() since that's the only place it's currently needed. This patch should not affect emerge behavior. svn path=/main/trunk/; revision=4021 --- bin/emerge | 4 +++- pym/portage.py | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/emerge b/bin/emerge index 6e4dae692..299798e3b 100755 --- a/bin/emerge +++ b/bin/emerge @@ -691,7 +691,9 @@ class depgraph: jbigkey = " ".join(mybigkey) + " merge" if self.digraph.hasnode(jbigkey): - if addme: + if addme and jbigkey != myparent: + # Refuse to make a node depend on itself so that the we don't + # don't create a bogus circular dependency in self.altlist(). self.digraph.addnode(jbigkey, myparent) return 1 jbigkey = " ".join(mybigkey) + " nomerge" diff --git a/pym/portage.py b/pym/portage.py index 96791b377..c46aea9f9 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -318,10 +318,6 @@ class digraph: self.okeys=[] def addnode(self,mykey,myparent): - if mykey == myparent: - # Refuse to make a node depend on itself so that the caller doesn't - # accidentally create a bogus circular dependency. - myparent = None if not self.dict.has_key(mykey): self.okeys.append(mykey) if myparent is None: -- 2.26.2