summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-07-25 04:57:38 +0000
committerZac Medico <zmedico@gentoo.org>2006-07-25 04:57:38 +0000
commite6a9e130e4f75d86d23744b4e78c63e54c390d3c (patch)
treed4bad8569fae9b9dd6dabfcc9cdf9654eac32fb3
parentc1adb11fbb479d6548668509fee0daa6b751bca6 (diff)
downloadportage-e6a9e130e4f75d86d23744b4e78c63e54c390d3c.tar.gz
portage-e6a9e130e4f75d86d23744b4e78c63e54c390d3c.tar.bz2
portage-e6a9e130e4f75d86d23744b4e78c63e54c390d3c.zip
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
-rwxr-xr-xbin/emerge4
-rw-r--r--pym/portage.py4
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: