Previously, the virtual cost minimization code from bug #141118 would
prevent virtual dependencies from pulling in new slots. That behavior
was not desired for --update, so now it's fixed to pull in the latest
slot available. This allows virtual/jdk-1.7.0 to be pulled in by
dependencies when --update is enabled.
continue
self._cpv_pkg_map[pkg.cpv] = pkg
ret.append(pkg.cpv)
- if ret:
+
+ if len(ret) > 1:
self._cpv_sort_ascending(ret)
+ if "--update" in self._depgraph._frozen_config.myopts:
+ # With --update, we want to force selection of
+ # the highest available version.
+ ret = [ret[-1]]
+
self._match_cache[atom] = ret
return ret[:]