Fix the code from bug #275796 to ensure that choices always go into the
authorZac Medico <zmedico@gentoo.org>
Thu, 27 Aug 2009 06:10:37 +0000 (06:10 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 27 Aug 2009 06:10:37 +0000 (06:10 -0000)
preferred_in_graph slot when appropriate.

svn path=/main/trunk/; revision=14164

pym/portage/__init__.py

index 27fa52cc2c4740e32d1c4c68ab9fea921ccc5d2e..8669dd7f88680151e66f776cb19bdfad2e3db9a7 100644 (file)
@@ -7705,7 +7705,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
                                                not slot_atom.startswith("virtual/"):
                                                all_installed_slots = False
                                                break
-                       if all_installed:
+                       if graph_db is None and all_installed:
                                if all_installed_slots:
                                        preferred_installed.append(this_choice)
                                else:
@@ -7750,7 +7750,13 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None):
                                        else:
                                                preferred_in_graph.append(this_choice)
                                else:
-                                       preferred_non_installed.append(this_choice)
+                                       if all_installed:
+                                               if all_installed_slots:
+                                                       preferred_installed.append(this_choice)
+                                               else:
+                                                       preferred_any_slot.append(this_choice)
+                                       else:
+                                               preferred_non_installed.append(this_choice)
                else:
                        other.append(this_choice)