aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-03-14 12:59:22 -0700
committerZac Medico <zmedico@gentoo.org>2020-03-14 13:35:35 -0700
commit3e7d37b7cec0978363fc99b089bd69caefe1b826 (patch)
treee064a125c2575f44493cd37f11044c7e950c7b83 /lib/_emerge/depgraph.py
parentman/emerge.1: fix logrotate directory containing elog-save-summary (diff)
downloadportage-3e7d37b7cec0978363fc99b089bd69caefe1b826.tar.gz
portage-3e7d37b7cec0978363fc99b089bd69caefe1b826.tar.bz2
portage-3e7d37b7cec0978363fc99b089bd69caefe1b826.zip
depgraph: respect --deep=<depth> with --update (bug 712298)
Fix the _wrapped_select_pkg_highest_available_imp method to select an installed package when appropriate for the current --deep=<depth> setting, even with --update enabled. This prevents violation of the current --deep=<depth> setting in cases where an installed package which satisfies a dependency is masked for any reason. Bug: https://bugs.gentoo.org/712298 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge/depgraph.py')
-rw-r--r--lib/_emerge/depgraph.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index a8ccd270d..6d1f62178 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
from __future__ import division, print_function, unicode_literals
@@ -6371,7 +6371,11 @@ class depgraph(object):
cpv = pkg.cpv
reinstall_for_flags = None
- if not pkg.installed or \
+ if pkg.installed and parent is not None and not self._want_update_pkg(parent, pkg):
+ # Ensure that --deep=<depth> is respected even when the
+ # installed package is masked and --update is enabled.
+ pass
+ elif not pkg.installed or \
(matched_packages and not avoid_update):
# Only enforce visibility on installed packages
# if there is at least one other visible package