From 33df10ae25e700d22b6c994267c3e108cca37f2e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 8 Apr 2008 18:42:49 +0000 Subject: 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 --- pym/_emerge/__init__.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'pym/_emerge/__init__.py') diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 96c4cbbc4..46a569ed4 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: -- cgit v1.2.3-1-g7c22