cache_key = (root, atom, onlydeps)
ret = self._highest_pkg_cache.get(cache_key)
if ret is not None:
+ pkg, existing = ret
+ if pkg and not existing:
+ existing = self._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._highest_pkg_cache[cache_key] = ret
return ret
ret = self._select_pkg_highest_available_imp(root, atom, onlydeps=onlydeps)
self._highest_pkg_cache[cache_key] = ret