1 |
Fix virtual choices to be consistent with circular dependency |
2 |
backtracking choices. |
3 |
|
4 |
Fixes: f78a91e44e3e ("backtracking: adjust || preference to break dependency cycles") |
5 |
Bug: https://bugs.gentoo.org/757306 |
6 |
Signed-off-by: Zac Medico <zmedico@g.o> |
7 |
--- |
8 |
lib/portage/dep/dep_check.py | 7 +++++-- |
9 |
1 file changed, 5 insertions(+), 2 deletions(-) |
10 |
|
11 |
diff --git a/lib/portage/dep/dep_check.py b/lib/portage/dep/dep_check.py |
12 |
index 60c8ec6d0..b89d5d651 100644 |
13 |
--- a/lib/portage/dep/dep_check.py |
14 |
+++ b/lib/portage/dep/dep_check.py |
15 |
@@ -356,6 +356,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None, |
16 |
|
17 |
# Alias the trees we'll be checking availability against |
18 |
parent = trees[myroot].get("parent") |
19 |
+ virt_parent = trees[myroot].get("virt_parent") |
20 |
priority = trees[myroot].get("priority") |
21 |
graph_db = trees[myroot].get("graph_db") |
22 |
graph = trees[myroot].get("graph") |
23 |
@@ -596,8 +597,10 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None, |
24 |
if match_from_list(atom, cpv_slot_list): |
25 |
circular_atom = atom |
26 |
break |
27 |
- else: |
28 |
- for circular_child in circular_dependency.get(parent, []): |
29 |
+ if circular_atom is None and circular_dependency is not None: |
30 |
+ for circular_child in itertools.chain( |
31 |
+ circular_dependency.get(parent, []), |
32 |
+ circular_dependency.get(virt_parent, [])): |
33 |
for atom in atoms: |
34 |
if not atom.blocker and atom.match(circular_child): |
35 |
circular_atom = atom |
36 |
-- |
37 |
2.26.2 |