dep_zapdeps: add other_installed_some choice bin
authorZac Medico <zmedico@gentoo.org>
Tue, 4 Jan 2011 23:47:54 +0000 (15:47 -0800)
committerZac Medico <zmedico@gentoo.org>
Tue, 4 Jan 2011 23:47:54 +0000 (15:47 -0800)
pym/portage/dep/dep_check.py

index cf62d337bc0aed9fbbaa37f5d20a131fc01ff00a..cd740cda3df64603ddf8c5e714dd746f7e8f1224 100644 (file)
@@ -257,6 +257,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
        unsat_use_installed = []
        unsat_use_non_installed = []
        other_installed = []
+       other_installed_some = []
        other = []
 
        # unsat_use_* must come after preferred_non_installed
@@ -270,6 +271,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
                unsat_use_installed,
                unsat_use_non_installed,
                other_installed,
+               other_installed_some,
                other,
        )
 
@@ -427,12 +429,18 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
                                                        unsat_use_non_installed.append(this_choice)
                else:
                        all_installed = True
+                       some_installed = False
                        for atom in atoms:
-                               if not atom.blocker and not vardb.match(atom):
-                                       all_installed = False
-                                       break
+                               if not atom.blocker:
+                                       if vardb.match(atom):
+                                               some_installed = True
+                                       else:
+                                               all_installed = False
+
                        if all_installed:
                                other_installed.append(this_choice)
+                       elif some_installed:
+                               other_installed_some.append(this_choice)
                        else:
                                other.append(this_choice)