For bug #158558, ignore invalid depstrings for packages that are being replaced anywa...
authorZac Medico <zmedico@gentoo.org>
Wed, 20 Dec 2006 23:09:09 +0000 (23:09 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 20 Dec 2006 23:09:09 +0000 (23:09 -0000)
svn path=/main/trunk/; revision=5339

bin/emerge

index 1ba5cbf8fd2fb2e69a2732b0fc6a7e3356883086..744db7b9e51e5ef150162a54f0d69307f28d9a31 100755 (executable)
@@ -1603,6 +1603,17 @@ class depgraph:
                        "--nodeps" in self.myopts:
                        return True
 
+               modified_slots = {}
+               for myroot in self.trees:
+                       myslots = {}
+                       modified_slots[myroot] = myslots
+                       final_db = self.mydbapi[myroot]
+                       slot_node_map = self._slot_node_map[myroot]
+                       for slot_atom, mynode in slot_node_map.iteritems():
+                               mytype, myroot, mycpv, mystatus = mynode
+                               if mystatus == "merge":
+                                       myslots[slot_atom] = mycpv
+
                #if "deep" in self.myparams:
                if True:
                        # Pull in blockers from all installed packages that haven't already
@@ -1647,6 +1658,14 @@ class depgraph:
                                                        pkgsettings, myuse=myuse, trees=dep_check_trees,
                                                        myroot=myroot)
                                                if not success:
+                                                       slot_atom = "%s:%s" % (portage.dep_getkey(pkg),
+                                                               vardb.aux_get(pkg, ["SLOT"])[0])
+                                                       if slot_atom in modified_slots[myroot]:
+                                                               # This package is being replaced anyway, so
+                                                               # ignore invalid dependencies so as not to
+                                                               # annoy the user too much (otherwise they'd be
+                                                               # forced to manually unmerge it first).
+                                                               continue
                                                        show_invalid_depstring_notice(
                                                                ("installed", myroot, pkg, "nomerge"),
                                                                depstr, atoms)
@@ -1667,18 +1686,6 @@ class depgraph:
                                                                self.blocker_parents[blocker] = myparents
                                                        myparents.add(myparent)
 
-               modified_slots = {}
-               if self.blocker_parents:
-                       for myroot in self.trees:
-                               myslots = {}
-                               modified_slots[myroot] = myslots
-                               final_db = self.mydbapi[myroot]
-                               slot_node_map = self._slot_node_map[myroot]
-                               for slot_atom, mynode in slot_node_map.iteritems():
-                                       mytype, myroot, mycpv, mystatus = mynode
-                                       if mystatus == "merge":
-                                               modified_slots[myroot][slot_atom] = mycpv
-
                for blocker in self.blocker_parents.keys():
                        mytype, myroot, mydep = blocker
                        initial_db = self.trees[myroot]["vartree"].dbapi