diff options
author | 2019-09-10 19:54:51 -0700 | |
---|---|---|
committer | 2019-09-11 18:31:21 -0700 | |
commit | 1e61c439143b12d079e1fc344bbc0c192a84cbe0 (patch) | |
tree | 102ed95cf4d5356b3b8533c8a99de1b9859ba943 /lib/_emerge/depgraph.py | |
parent | make.conf: clarify distlocks usage (diff) | |
download | portage-1e61c439143b12d079e1fc344bbc0c192a84cbe0.tar.gz portage-1e61c439143b12d079e1fc344bbc0c192a84cbe0.tar.bz2 portage-1e61c439143b12d079e1fc344bbc0c192a84cbe0.zip |
_add_dep: less aggressive backtracking (bug 693836)
In order to suppress the sort of aggressive backtracking that can
trigger undesirable downgrades as in bug 693836, do not backtrack
for an unsatisfied dependency if there's an available package in
the runtime package mask which was involved in a slot conflict and
satisfied all involved parent atoms. Instead, discard the current
depgraph in favor of other backtracking configurations that may
exist. This case would not have been encountered prior to the fix
for bug 692746 which enabled backtracking for the type of slot
conflict that is detected here.
Fixes: 994ac00aa764 ("_slot_confict_backtrack: consider masking a package matched by all parent atoms (bug 692746)")
Bug: https://bugs.gentoo.org/693836
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge/depgraph.py')
-rw-r--r-- | lib/_emerge/depgraph.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py index 6be1b3ec7..51614fc14 100644 --- a/lib/_emerge/depgraph.py +++ b/lib/_emerge/depgraph.py @@ -2888,6 +2888,19 @@ class depgraph(object): dep.atom.without_use if dep.atom.package else dep.atom, onlydeps=dep.onlydeps) if dep_pkg is None: + + # In order to suppress the sort of aggressive + # backtracking that can trigger undesirable downgrades + # as in bug 693836, do not backtrack if there's an + # available package which was involved in a slot + # conflict and satisfied all involved parent atoms. + for dep_pkg, reasons in self._dynamic_config._runtime_pkg_mask.items(): + if (dep.atom.match(dep_pkg) and + len(reasons) == 1 and + not reasons.get("slot conflict", True)): + self._dynamic_config._skip_restart = True + return 0 + self._dynamic_config._backtrack_infos["missing dependency"] = dep self._dynamic_config._need_restart = True if debug: |