summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2010-04-14 15:47:24 +0200
committerZac Medico <zmedico@gentoo.org>2010-04-27 14:17:51 -0700
commitdd512c0e119eb1e07053ec1bb349f044e465d44e (patch)
tree3119be19692e2952b8891fec475bcacec2cc385f
parentfa651f44178fa2d7a6e10f6ce2be7b36217022ca (diff)
downloadportage-dd512c0e119eb1e07053ec1bb349f044e465d44e.tar.gz
portage-dd512c0e119eb1e07053ec1bb349f044e465d44e.tar.bz2
portage-dd512c0e119eb1e07053ec1bb349f044e465d44e.zip
--update: don't match lower versions if the higher versions have the wrong use config
-rw-r--r--pym/_emerge/depgraph.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 1f326e87c..65df15c55 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2414,6 +2414,7 @@ class depgraph(object):
reinstall = False
noreplace = "--noreplace" in self._frozen_config.myopts
avoid_update = "--update" not in self._frozen_config.myopts
+ dont_miss_updates = "--update" in self._frozen_config.myopts
use_ebuild_visibility = self._frozen_config.myopts.get(
'--use-ebuild-visibility', 'n') != 'n'
# Behavior of the "selective" parameter depends on
@@ -2428,6 +2429,7 @@ class depgraph(object):
# available packages match argument atoms, which is
# represented by the found_available_arg flag.
found_available_arg = False
+ packages_with_invalid_use_config = []
for find_existing_node in True, False:
if existing_node:
break
@@ -2445,6 +2447,18 @@ class depgraph(object):
if pkg in self._dynamic_config._runtime_pkg_mask:
# The package has been masked by the backtracking logic
continue
+
+ if dont_miss_updates:
+ higher_version_rejected = False
+ for rejected in packages_with_invalid_use_config:
+ if rejected.cp != pkg.cp:
+ continue
+ if rejected > pkg:
+ higher_version_rejected = True
+ break
+ if higher_version_rejected:
+ continue
+
cpv = pkg.cpv
# Make --noreplace take precedence over --newuse.
if not pkg.installed and noreplace and \
@@ -2521,8 +2535,10 @@ class depgraph(object):
if atom.use and not pkg.built:
use = pkg.use.enabled
if atom.use.enabled.difference(use):
+ packages_with_invalid_use_config.append(pkg)
continue
if atom.use.disabled.intersection(use):
+ packages_with_invalid_use_config.append(pkg)
continue
if pkg.cp == atom_cp:
if highest_version is None: