Revert r4495, since conversion from nomerge to merge may put the depgraph into an...
authorZac Medico <zmedico@gentoo.org>
Fri, 22 Sep 2006 09:55:27 +0000 (09:55 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 22 Sep 2006 09:55:27 +0000 (09:55 -0000)
svn path=/main/trunk/; revision=4496

bin/emerge
pym/portage.py

index a8af02919743c08a93ed462838aa3eea3144ad1e..afd107080b03c338216688855b384379973d1caa 100755 (executable)
@@ -717,12 +717,13 @@ class depgraph:
                        return 1
                jbigkey = " ".join(mybigkey) + " nomerge"
                if self.digraph.hasnode(jbigkey):
+                       """XXX: It's possible that this package has been explicitly
+                       requested as a command line argument.  This can be solved by
+                       checking all args prior to marking packages as nomerge"""
                        if rev_dep and myparent:
                                self.digraph.addnode(myparent, jbigkey, soft_dep=soft_dep)
                        else:
                                self.digraph.addnode(jbigkey, myparent, soft_dep=soft_dep)
-                       if arg:
-                               self.digraph.replace(jbigkey, " ".join(mybigkey) + " merge")
                        return 1
                
                self.spinner.update()
index a97c50171832d9a2d747cfb15d7a84e0d664b589..104f1a27917aabae18c2dfadcb7d45ba83a936bc 100644 (file)
@@ -364,32 +364,6 @@ class digraph:
                del self.nodes[node]
                self.order.remove(node)
 
-       def replace(self, oldnode, newnode):
-               """Replace all references to oldnode with references to newnode.
-               This is useful for upgrading a "nomerge" node to a "merge" node.
-
-               @return:
-                       1. None on success.
-                       2. Raise a KeyError if oldnode does not exist.
-                       3. Raise a ValueError if newnode already exists.
-               """
-               if not self.contains(oldnode):
-                       raise KeyError(oldnode)
-               if oldnode == newnode:
-                       return
-               if newnode in self.nodes:
-                       raise ValueError(newnode)
-               for parent in self.nodes[oldnode][1]:
-                       self.nodes[parent][0][newnode] = self.nodes[parent][0][oldnode]
-                       del self.nodes[parent][0][oldnode]
-               for child in self.nodes[oldnode][0]:
-                       self.nodes[child][1][newnode] = self.nodes[child][1][oldnode]
-                       del self.nodes[child][1][oldnode]
-               self.nodes[newnode] = self.nodes[oldnode]
-               del self.nodes[oldnode]
-               oldindex = self.order.index(oldnode)
-               self.order[oldindex] = newnode
-
        def contains(self, node):
                """Checks if the digraph contains mynode"""
                return node in self.nodes