summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-14 01:57:22 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-14 01:57:22 +0000
commitf8aa168d03f1f3535150765a6d37dfec0a836518 (patch)
tree6fd1f1ddfc6ed0e18ec1698545b613cffc3e6ccb
parentf673b731361b5ffd4b11678151e2e66842bffe67 (diff)
downloadportage-f8aa168d03f1f3535150765a6d37dfec0a836518.tar.gz
portage-f8aa168d03f1f3535150765a6d37dfec0a836518.tar.bz2
portage-f8aa168d03f1f3535150765a6d37dfec0a836518.zip
Use depgraph.pkg_node_map so simplify comparison against existing nodes at the beginning of depgraph.create().
svn path=/main/trunk/; revision=5290
-rwxr-xr-xbin/emerge21
1 files changed, 7 insertions, 14 deletions
diff --git a/bin/emerge b/bin/emerge
index 9450e6a55..178168ebf 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -901,25 +901,18 @@ class depgraph:
#IUSE-aware emerge -> USE DEP aware depgraph
#"no downgrade" emerge
"""
- jbigkey = tuple(chain(mybigkey, ["merge"]))
mytype, myroot, mykey = mybigkey
- if self.digraph.hasnode(jbigkey):
- if addme and jbigkey != myparent:
+ existing_node = self.pkg_node_map[myroot].get(mykey, None)
+ if existing_node:
+ if addme and existing_node != 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().
if rev_dep and myparent:
- ptype, proot, pkey, pstatus = myparent
- self.digraph.addnode(myparent, jbigkey, priority=priority)
+ self.digraph.addnode(myparent, existing_node,
+ priority=priority)
else:
- self.digraph.addnode(jbigkey, myparent, priority=priority)
- return 1
- jbigkey = tuple(chain(mybigkey, ["nomerge"]))
- if self.digraph.hasnode(jbigkey):
- if rev_dep and myparent:
- ptype, proot, pkey, pstatus = myparent
- self.digraph.addnode(myparent, jbigkey, priority=priority)
- else:
- self.digraph.addnode(jbigkey, myparent, priority=priority)
+ self.digraph.addnode(existing_node, myparent,
+ priority=priority)
return 1
self.spinner.update()