aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2021-01-10 16:19:06 -0800
committerZac Medico <zmedico@gentoo.org>2021-01-10 19:32:45 -0800
commit4c25c0d7af7ad71fccbfafe1e5019116c691968e (patch)
tree5a7320c91b915cf9aca1314d9c3677adc982c723 /lib/_emerge
parentAdd unit test demonstrating bug 764764 (diff)
downloadportage-4c25c0d7af7ad71fccbfafe1e5019116c691968e.tar.gz
portage-4c25c0d7af7ad71fccbfafe1e5019116c691968e.tar.bz2
portage-4c25c0d7af7ad71fccbfafe1e5019116c691968e.zip
check_reverse_dependencies: dereference virtual expansions (bug 764764)
If an atom is the result of virtual expansion, then derefrence it to _orig_atom in check_reverse_dependencies so that it will be correctly handled as a built slot operator dependency when appropriate. This solves a case triggered in bug 764764 where a virtual expansion from virtual/dist-kernel:0/5.10.5= to =virtual/dist-kernel-5.10.5 prevented the atom from being handled as a built slot operator dependency, which prevented rebuilds from being triggered. Bug: https://bugs.gentoo.org/764764 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge')
-rw-r--r--lib/_emerge/depgraph.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index f3e834a60..2bf04406f 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -2073,6 +2073,12 @@ class depgraph:
for parent, atom in self._dynamic_config._parent_atoms.get(existing_pkg, []):
if isinstance(parent, Package):
if parent in built_slot_operator_parents:
+ if hasattr(atom, '_orig_atom'):
+ # If atom is the result of virtual expansion, then
+ # derefrence it to _orig_atom so that it will be correctly
+ # handled as a built slot operator dependency when
+ # appropriate (see bug 764764).
+ atom = atom._orig_atom
# This parent may need to be rebuilt, therefore
# discard its soname and built slot operator
# dependency components which are not necessarily
@@ -2131,6 +2137,22 @@ class depgraph:
allow_repo=True)
if not atom_set.findAtomForPackage(candidate_pkg,
modified_use=self._pkg_use_enabled(candidate_pkg)):
+ if debug:
+ parent_atoms = []
+ for other_parent, other_atom in self._dynamic_config._parent_atoms.get(existing_pkg, []):
+ if other_parent is parent:
+ parent_atoms.append(other_atom)
+ msg = (
+ "",
+ "",
+ "check_reverse_dependencies:",
+ " candidate package does not match atom '%s': %s" % (atom, candidate_pkg),
+ " parent: %s" % parent,
+ " parent atoms: %s" % " ".join(parent_atoms),
+ "",
+ )
+ writemsg_level("\n".join(msg),
+ noiselevel=-1, level=logging.DEBUG)
return False
return True