summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-04-08 18:42:49 +0000
committerZac Medico <zmedico@gentoo.org>2008-04-08 18:42:49 +0000
commit33df10ae25e700d22b6c994267c3e108cca37f2e (patch)
tree784ad363b3b56b1777f790bac7a2cc8c4be087a4
parentFix --update greedy atoms logic so that it only pulls in packages that (diff)
downloadportage-idfetch-33df10ae25e700d22b6c994267c3e108cca37f2e.tar.gz
portage-idfetch-33df10ae25e700d22b6c994267c3e108cca37f2e.tar.bz2
portage-idfetch-33df10ae25e700d22b6c994267c3e108cca37f2e.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. svn path=/main/trunk/; revision=9756
-rw-r--r--RELEASE-NOTES7
-rw-r--r--pym/_emerge/__init__.py17
2 files changed, 14 insertions, 10 deletions
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 788f9118..c107bbce 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -32,13 +32,6 @@ portage-2.2
* "world" does no longer include "system" unconditionally, but you can add
"@system" to the worldfile to restore the old state.
-portage-2.1.5
-==================================
-* In the event that a previously installed package has since been masked,
- emerge will no longer perform an automatic downgrade as part of a "world"
- update. You should either unmask such packages or else explicitly re-merge
- them in order to have them dowgraded to an unmasked version.
-
portage-2.1.4.1
==================================
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 96c4cbbc..46a569ed 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -1433,6 +1433,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]
@@ -2550,9 +2555,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: