Fix _select_pkg_highest_available_imp to reject installed packages
authorZac Medico <zmedico@gentoo.org>
Fri, 6 Aug 2010 23:27:26 +0000 (16:27 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 6 Aug 2010 23:27:26 +0000 (16:27 -0700)
returned from _wrapped_select_pkg_highest_available_imp when
necessary.

pym/_emerge/depgraph.py

index 3b604f04fb97050090f9911205a8e9afdb44dd75..c05679561383be0e53998b11a6b548a031247971 100644 (file)
@@ -2545,6 +2545,11 @@ class depgraph(object):
                                                root, atom, onlydeps=onlydeps,
                                                allow_use_changes=True, allow_unstable_keywords=allow_unstable_keywords)
 
+                               if pkg is not None and \
+                                       pkg.installed and \
+                                       not self._want_installed_pkg(pkg):
+                                       pkg = None
+
                                if pkg is not None and not pkg.visible:
                                        self._dynamic_config._needed_user_config_changes.setdefault(pkg, set()).add("unstable keyword")