public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-portage-dev] [PATCH] backtracking: fix virtual choices for circular deps (bug 757306)
@ 2020-11-28  3:18 99% Zac Medico
  0 siblings, 0 replies; 1+ results
From: Zac Medico @ 2020-11-28  3:18 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Zac Medico

Fix virtual choices to be consistent with circular dependency
backtracking choices.

Fixes: f78a91e44e3e ("backtracking: adjust || preference to break dependency cycles")
Bug: https://bugs.gentoo.org/757306
Signed-off-by: Zac Medico <zmedico@gentoo.org>
---
 lib/portage/dep/dep_check.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/portage/dep/dep_check.py b/lib/portage/dep/dep_check.py
index 60c8ec6d0..b89d5d651 100644
--- a/lib/portage/dep/dep_check.py
+++ b/lib/portage/dep/dep_check.py
@@ -356,6 +356,7 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None,
 
 	# Alias the trees we'll be checking availability against
 	parent   = trees[myroot].get("parent")
+	virt_parent = trees[myroot].get("virt_parent")
 	priority = trees[myroot].get("priority")
 	graph_db = trees[myroot].get("graph_db")
 	graph    = trees[myroot].get("graph")
@@ -596,8 +597,10 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None,
 							if match_from_list(atom, cpv_slot_list):
 								circular_atom = atom
 								break
-						else:
-							for circular_child in circular_dependency.get(parent, []):
+				if circular_atom is None and circular_dependency is not None:
+					for circular_child in itertools.chain(
+								circular_dependency.get(parent, []),
+								circular_dependency.get(virt_parent, [])):
 								for atom in atoms:
 									if not atom.blocker and atom.match(circular_child):
 										circular_atom = atom
-- 
2.26.2



^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-11-28  3:18 99% [gentoo-portage-dev] [PATCH] backtracking: fix virtual choices for circular deps (bug 757306) Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox