Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/dep/
Date: Sat, 28 Nov 2020 20:37:53
Message-Id: 1606533182.b59e2545a88dccf70e546d49e08a5a99110dd628.zmedico@gentoo
1 commit: b59e2545a88dccf70e546d49e08a5a99110dd628
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 28 01:04:07 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 28 03:13:02 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b59e2545
7
8 backtracking: fix virtual choices for circular deps (bug 757306)
9
10 Fix virtual choices to be consistent with circular dependency
11 backtracking choices.
12
13 Fixes: f78a91e44e3e ("backtracking: adjust || preference to break dependency cycles")
14 Bug: https://bugs.gentoo.org/757306
15 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
16
17 lib/portage/dep/dep_check.py | 7 +++++--
18 1 file changed, 5 insertions(+), 2 deletions(-)
19
20 diff --git a/lib/portage/dep/dep_check.py b/lib/portage/dep/dep_check.py
21 index 60c8ec6d0..b89d5d651 100644
22 --- a/lib/portage/dep/dep_check.py
23 +++ b/lib/portage/dep/dep_check.py
24 @@ -356,6 +356,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None,
25
26 # Alias the trees we'll be checking availability against
27 parent = trees[myroot].get("parent")
28 + virt_parent = trees[myroot].get("virt_parent")
29 priority = trees[myroot].get("priority")
30 graph_db = trees[myroot].get("graph_db")
31 graph = trees[myroot].get("graph")
32 @@ -596,8 +597,10 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None,
33 if match_from_list(atom, cpv_slot_list):
34 circular_atom = atom
35 break
36 - else:
37 - for circular_child in circular_dependency.get(parent, []):
38 + if circular_atom is None and circular_dependency is not None:
39 + for circular_child in itertools.chain(
40 + circular_dependency.get(parent, []),
41 + circular_dependency.get(virt_parent, [])):
42 for atom in atoms:
43 if not atom.blocker and atom.match(circular_child):
44 circular_atom = atom