aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-04-11 17:01:05 -0700
committerZac Medico <zmedico@gentoo.org>2020-04-11 17:56:43 -0700
commit9b755b46f9e88f25fecada0a32095ea614a73b57 (patch)
tree5faf184bed504f2eb1ce83684d038edf3c142fd1 /lib/_emerge
parentAdd test case to reproduce bug 717140 (diff)
downloadportage-9b755b46f9e88f25fecada0a32095ea614a73b57.tar.gz
portage-9b755b46f9e88f25fecada0a32095ea614a73b57.tar.bz2
portage-9b755b46f9e88f25fecada0a32095ea614a73b57.zip
depgraph: respect <foo-version:= for slot operator rebuild (bug 717140)
When searching for slot operator rebuilds, respect non slot-operator components of parent dependencies, so that a <foo-version:= dependency like the <dev-libs/libgit2-1:0=[ssh?] dependency from bug 717140 will not be completely ignored. This will prevent erroneous attempts to trigger slot operator rebuilds for upgrades that would break <foo-version:= dependencies (which triggered upgrade/downgrade loops when backtracking tried to resolve the breakage). Fixes: d569a2d7275c ("_slot_operator_update_probe: fix bug #508762") Bug: https://bugs.gentoo.org/717140 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge')
-rw-r--r--lib/_emerge/depgraph.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 6d1f62178..ec90e59df 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -2068,9 +2068,15 @@ class depgraph(object):
for parent, atom in self._dynamic_config._parent_atoms.get(existing_pkg, []):
if isinstance(parent, Package):
if parent in built_slot_operator_parents:
- # This parent may need to be rebuilt, so its
- # dependencies aren't necessarily relevant.
- continue
+ # This parent may need to be rebuilt, therefore
+ # discard its soname and built slot operator
+ # dependency components which are not necessarily
+ # relevant.
+ if atom.soname:
+ continue
+ elif atom.package and atom.slot_operator_built:
+ # This discards the slot/subslot component.
+ atom = atom.with_slot("=")
if replacement_parent is not None and \
(replacement_parent.slot_atom == parent.slot_atom