summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-12 22:25:20 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-12 22:25:20 +0000
commitfa8f5498ae6e83643e48478c26b6f25592ca4f31 (patch)
tree38da68ef8af5e8726356e2e505ed6f6529e2b3e3
parent1ebebf1d7cece3095d20e5959a4f149e565bd960 (diff)
downloadportage-fa8f5498ae6e83643e48478c26b6f25592ca4f31.tar.gz
portage-fa8f5498ae6e83643e48478c26b6f25592ca4f31.tar.bz2
portage-fa8f5498ae6e83643e48478c26b6f25592ca4f31.zip
For bug #157897, ensure that only "merge" nodes are stored in digraph.pkg_node_map.
svn path=/main/trunk/; revision=5280
-rwxr-xr-xbin/emerge19
1 files changed, 13 insertions, 6 deletions
diff --git a/bin/emerge b/bin/emerge
index cde831622..78130487d 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -802,6 +802,7 @@ class depgraph:
self.edebug = 1
self.spinner = spinner
self.pkgsettings = {}
+ # Maps cpv to digraph node for "merge" nodes only.
self.pkg_node_map = {}
self.mydbapi = {}
self._mydbapi_keys = ["SLOT", "DEPEND", "RDEPEND", "PDEPEND"]
@@ -863,20 +864,24 @@ class depgraph:
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.pkg_node_map[myroot][mykey] = jbigkey
+ if jbigkey[-1] == "merge":
+ self.pkg_node_map[myroot][mykey] = jbigkey
if rev_dep and myparent:
ptype, proot, pkey, pstatus = myparent
- self.pkg_node_map[proot][pkey] = myparent
+ if myparent[-1] == "merge":
+ self.pkg_node_map[proot][pkey] = myparent
self.digraph.addnode(myparent, jbigkey, priority=priority)
else:
self.digraph.addnode(jbigkey, myparent, priority=priority)
return 1
jbigkey = tuple(chain(mybigkey, ["nomerge"]))
if self.digraph.hasnode(jbigkey):
- self.pkg_node_map[myroot][mykey] = jbigkey
+ if jbigkey[-1] == "merge":
+ self.pkg_node_map[myroot][mykey] = jbigkey
if rev_dep and myparent:
ptype, proot, pkey, pstatus = myparent
- self.pkg_node_map[proot][pkey] = myparent
+ if myparent[-1] == "merge":
+ self.pkg_node_map[proot][pkey] = myparent
self.digraph.addnode(myparent, jbigkey, priority=priority)
else:
self.digraph.addnode(jbigkey, myparent, priority=priority)
@@ -951,10 +956,12 @@ class depgraph:
depgraph already and returned, or we are here. Whether we are merging or not; we must
add the package to the depgraph; so we do that here. """
jbigkey = tuple(mybigkey)
- self.pkg_node_map[myroot][mykey] = jbigkey
+ if jbigkey[-1] == "merge":
+ self.pkg_node_map[myroot][mykey] = jbigkey
if rev_dep and myparent:
ptype, proot, pkey, pstatus = myparent
- self.pkg_node_map[proot][pkey] = myparent
+ if myparent[-1] == "merge":
+ self.pkg_node_map[proot][pkey] = myparent
self.digraph.addnode(myparent, jbigkey,
priority=priority)
else: