depgraph: simplify _select_pkg_highest_available
authorZac Medico <zmedico@gentoo.org>
Sat, 16 Jun 2012 20:27:30 +0000 (13:27 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 16 Jun 2012 20:27:30 +0000 (13:27 -0700)
This hunk of code is no longer needed since the content of
_highest_pkg_cache is discarded each time a package is added to the
graph.

pym/_emerge/depgraph.py

index 83c17ace67e11b4dd10982063ff3c1bbe5215bf2..276a7495e4fda96510bebf3834802156c16205a6 100644 (file)
@@ -3468,14 +3468,6 @@ class depgraph(object):
                cache_key = (root, atom, atom.unevaluated_atom, onlydeps, self._dynamic_config._autounmask)
                ret = self._dynamic_config._highest_pkg_cache.get(cache_key)
                if ret is not None:
-                       pkg, existing = ret
-                       if pkg and not existing:
-                               existing = self._dynamic_config._slot_pkg_map[root].get(pkg.slot_atom)
-                               if existing and existing == pkg:
-                                       # Update the cache to reflect that the
-                                       # package has been added to the graph.
-                                       ret = pkg, pkg
-                                       self._dynamic_config._highest_pkg_cache[cache_key] = ret
                        return ret
                ret = self._select_pkg_highest_available_imp(root, atom, onlydeps=onlydeps)
                self._dynamic_config._highest_pkg_cache[cache_key] = ret