summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-06-30 21:46:22 +0000
committerZac Medico <zmedico@gentoo.org>2009-06-30 21:46:22 +0000
commite8c96a0c6b90265aed57f422342ab86ef456dcb3 (patch)
tree47b179223e43fdb67bfa5a1ebf28cb01e4096318
parentf2d79bd71046d1b5b9a9c949c667739159ab5c98 (diff)
downloadportage-e8c96a0c6b90265aed57f422342ab86ef456dcb3.tar.gz
portage-e8c96a0c6b90265aed57f422342ab86ef456dcb3.tar.bz2
portage-e8c96a0c6b90265aed57f422342ab86ef456dcb3.zip
Tweak depgraph._select_pkg_highest_available_imp to avoid more updates when
in --avoid-update, by ignoring masked installed packages and packages for which the ebuild is no longer available. svn path=/main/trunk/; revision=13746
-rw-r--r--pym/_emerge/depgraph.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index de097c419..a69ee323d 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -1882,6 +1882,7 @@ class depgraph(object):
selective = "selective" in self.myparams
reinstall = False
noreplace = "--noreplace" in self.myopts
+ avoid_update = "--avoid-update" in self.myopts
# Behavior of the "selective" parameter depends on
# whether or not a package matches an argument atom.
# If an installed package provides an old-style
@@ -1918,7 +1919,9 @@ class depgraph(object):
continue
reinstall_for_flags = None
- if not installed or (built and matched_packages):
+ if not pkg.installed or \
+ (pkg.built and matched_packages and \
+ not (avoid_update and pkg.installed)):
# Only enforce visibility on installed packages
# if there is at least one other visible package
# available. By filtering installed masked packages
@@ -2091,7 +2094,7 @@ class depgraph(object):
break
if len(matched_packages) > 1:
- if "--avoid-update" in self.myopts:
+ if avoid_update:
for pkg in matched_packages:
if pkg.installed:
return pkg, existing_node