summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-08 20:01:38 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-08 20:01:38 +0000
commit405f5103c2b2877ffde4f3b9d37edc5a9d6f90b8 (patch)
treefad14cc0c917bf8895a9daa3a15987970beac77e /bin
parente48d55096a70f11cc2437650987abc94bebc92e4 (diff)
downloadportage-405f5103c2b2877ffde4f3b9d37edc5a9d6f90b8.tar.gz
portage-405f5103c2b2877ffde4f3b9d37edc5a9d6f90b8.tar.bz2
portage-405f5103c2b2877ffde4f3b9d37edc5a9d6f90b8.zip
Bug #197810 - Don't automatically downgrade packages for which available
matching versions are masked by corruption, but do automatically downgrade installed packages that themselves have a valid mask such as from package.mask. (trunk r9756) svn path=/main/branches/2.1.2/; revision=9758
Diffstat (limited to 'bin')
-rwxr-xr-xbin/emerge17
1 files changed, 14 insertions, 3 deletions
diff --git a/bin/emerge b/bin/emerge
index d50adaf43..e4359ad13 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1572,6 +1572,11 @@ class DepcheckCompositeDB(object):
arg = None
if arg:
ret = []
+ if ret is None and pkg.installed and \
+ not visible(self._depgraph.pkgsettings[pkg.root], pkg):
+ # For disjunctive || deps, this will cause alternative
+ # atoms or packages to be selected if available.
+ ret = []
if ret is None:
self._cpv_tree_map[pkg.cpv] = \
self._depgraph.pkg_tree_map[pkg.type_name]
@@ -2689,9 +2694,15 @@ class depgraph(object):
if not installed:
# masked by corruption
continue
- if not installed:
- if myarg:
- found_available_arg = True
+ if not installed and myarg:
+ found_available_arg = True
+ if not installed or (installed and matched_packages):
+ # Only enforce visibility on installed packages
+ # if there is at least one other visible package
+ # available. By filtering installed masked packages
+ # here, packages that have been masked since they
+ # were installed can be automatically downgraded
+ # to an unmasked version.
if not visible(pkgsettings, pkg):
continue
if not built and not calculated_use: