aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2019-12-23 15:15:45 -0800
committerZac Medico <zmedico@gentoo.org>2019-12-23 15:28:19 -0800
commitf68752b7020c66e501b49acc580d023654a96949 (patch)
tree38f3b2aa6d11e85a48f548a726ff5b606f179e75 /lib/_emerge/depgraph.py
parentemerge --with-test-deps: allow circular deps (diff)
downloadportage-f68752b7020c66e501b49acc580d023654a96949.tar.gz
portage-f68752b7020c66e501b49acc580d023654a96949.tar.bz2
portage-f68752b7020c66e501b49acc580d023654a96949.zip
_queue_disjunctive_deps: group disjunctions recursively (bug 701996)
When disjunctive dependencies are queued, recursively group together disjunctions from the same dependency string so that any overlap between them will trigger expansion to DNF. Fixes: fa7b6ea6ecdc ("_queue_disjunctive_deps: group disjunctions (bug 701996)") Bug: https://bugs.gentoo.org/701996 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib/_emerge/depgraph.py')
-rw-r--r--lib/_emerge/depgraph.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 83631fe70..2ab1bf4ac 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -3865,20 +3865,20 @@ class depgraph(object):
child_pkgs.sort()
yield (atom, child_pkgs[-1])
- def _queue_disjunctive_deps(self, pkg, dep_root, dep_priority, dep_struct):
+ def _queue_disjunctive_deps(self, pkg, dep_root, dep_priority, dep_struct, _disjunctions_recursive=None):
"""
Queue disjunctive (virtual and ||) deps in self._dynamic_config._dep_disjunctive_stack.
Yields non-disjunctive deps. Raises InvalidDependString when
necessary.
"""
- disjunctions = []
+ disjunctions = [] if _disjunctions_recursive is None else _disjunctions_recursive
for x in dep_struct:
if isinstance(x, list):
if x and x[0] == "||":
disjunctions.append(x)
else:
for y in self._queue_disjunctive_deps(
- pkg, dep_root, dep_priority, x):
+ pkg, dep_root, dep_priority, x, _disjunctions_recursive=disjunctions):
yield y
else:
# Note: Eventually this will check for PROPERTIES=virtual
@@ -3889,7 +3889,7 @@ class depgraph(object):
else:
yield x
- if disjunctions:
+ if _disjunctions_recursive is None and disjunctions:
self._queue_disjunction(pkg, dep_root, dep_priority, disjunctions)
def _queue_disjunction(self, pkg, dep_root, dep_priority, dep_struct):