From: Zac Medico Date: Fri, 9 Sep 2011 19:58:27 +0000 (-0700) Subject: depgraph: pull in new virtual slots with --update X-Git-Tag: v2.2.0_alpha55~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=21330075f07248765016e104b3ba8216903f1ecb;p=portage.git depgraph: pull in new virtual slots with --update 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. --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index de7bd4abf..d6728c106 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -6567,8 +6567,14 @@ class _dep_check_composite_db(dbapi): 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[:]