summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-09-09 12:58:27 -0700
committerZac Medico <zmedico@gentoo.org>2011-09-09 12:58:27 -0700
commit21330075f07248765016e104b3ba8216903f1ecb (patch)
treefacea319866cf1cf42c7b55160818b6adf4bbd72 /pym
parent58eb89592bfc3ac40ac0235ebcc52910b51a826c (diff)
downloadportage-21330075f07248765016e104b3ba8216903f1ecb.tar.gz
portage-21330075f07248765016e104b3ba8216903f1ecb.tar.bz2
portage-21330075f07248765016e104b3ba8216903f1ecb.zip
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.
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/depgraph.py8
1 files changed, 7 insertions, 1 deletions
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[:]