aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2019-08-24 15:30:29 -0700
committerZac Medico <zmedico@gentoo.org>2019-09-01 10:33:54 -0700
commit994ac00aa764615ec6d319c7c1cb8123cf9f2aa1 (patch)
treea8d65c0e6a02fae775dac7cd39f6ab358ba6df65 /lib/_emerge/depgraph.py
parentman/glsa-check.1: remove deprecated "new" target (diff)
downloadportage-994ac00aa764615ec6d319c7c1cb8123cf9f2aa1.tar.gz
portage-994ac00aa764615ec6d319c7c1cb8123cf9f2aa1.tar.bz2
portage-994ac00aa764615ec6d319c7c1cb8123cf9f2aa1.zip
_slot_confict_backtrack: consider masking a package matched by all parent atoms (bug 692746)
When a slot conflict occurs involving a package that is matched by all involved parent atoms, consider masking the package in order to avoid a possible missed update. The included unit test demonstrates the case fixed by this patch. There are 2 previously existing unit tests that require larger backtracking values in order to succeed with this patch, since more possible solutions are now considered. Bug: https://bugs.gentoo.org/692746 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge/depgraph.py')
-rw-r--r--lib/_emerge/depgraph.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 08240af67..6be1b3ec7 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -1768,6 +1768,11 @@ class depgraph(object):
debug = "--debug" in self._frozen_config.myopts
existing_node = next(self._dynamic_config._package_tracker.match(
root, slot_atom, installed=False))
+ if existing_node not in conflict_pkgs:
+ # Even though all parent atoms match existing_node,
+ # consider masking it in order to avoid a missed update
+ # as in bug 692746.
+ conflict_pkgs.append(existing_node)
# In order to avoid a missed update, first mask lower versions
# that conflict with higher versions (the backtracker visits
# these in reverse order).