diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-07-25 04:57:38 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-07-25 04:57:38 +0000 |
commit | e6a9e130e4f75d86d23744b4e78c63e54c390d3c (patch) | |
tree | d4bad8569fae9b9dd6dabfcc9cdf9654eac32fb3 | |
parent | c1adb11fbb479d6548668509fee0daa6b751bca6 (diff) | |
download | portage-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-x | bin/emerge | 4 | ||||
-rw-r--r-- | 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: |