dep_zapdeps: add other_installed choice bin
authorZac Medico <zmedico@gentoo.org>
Tue, 4 Jan 2011 01:13:24 +0000 (17:13 -0800)
committerZac Medico <zmedico@gentoo.org>
Tue, 4 Jan 2011 01:20:31 +0000 (17:20 -0800)
Hopefully this will fix bug #350488.

pym/portage/dep/dep_check.py

index fca1594a7fe5488c68a7cfc7b9a1745a313b7cdc..cf62d337bc0aed9fbbaa37f5d20a131fc01ff00a 100644 (file)
@@ -256,6 +256,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
        unsat_use_in_graph = []
        unsat_use_installed = []
        unsat_use_non_installed = []
+       other_installed = []
        other = []
 
        # unsat_use_* must come after preferred_non_installed
@@ -268,6 +269,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
                unsat_use_in_graph,
                unsat_use_installed,
                unsat_use_non_installed,
+               other_installed,
                other,
        )
 
@@ -424,7 +426,15 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
                                                else:
                                                        unsat_use_non_installed.append(this_choice)
                else:
-                       other.append(this_choice)
+                       all_installed = True
+                       for atom in atoms:
+                               if not atom.blocker and not vardb.match(atom):
+                                       all_installed = False
+                                       break
+                       if all_installed:
+                               other_installed.append(this_choice)
+                       else:
+                               other.append(this_choice)
 
        # Prefer choices which contain upgrades to higher slots. This helps
        # for deps such as || ( foo:1 foo:2 ), where we want to prefer the