aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_emerge/depgraph.py')
-rw-r--r--lib/_emerge/depgraph.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index f80b077bc..78226a3ea 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -3850,10 +3850,11 @@ class depgraph(object):
Yields non-disjunctive deps. Raises InvalidDependString when
necessary.
"""
+ disjunctions = []
for x in dep_struct:
if isinstance(x, list):
if x and x[0] == "||":
- self._queue_disjunction(pkg, dep_root, dep_priority, [x])
+ disjunctions.append(x)
else:
for y in self._queue_disjunctive_deps(
pkg, dep_root, dep_priority, x):
@@ -3863,10 +3864,13 @@ class depgraph(object):
# or whatever other metadata gets implemented for this
# purpose.
if x.cp.startswith('virtual/'):
- self._queue_disjunction(pkg, dep_root, dep_priority, [x])
+ disjunctions.append(x)
else:
yield x
+ if disjunctions:
+ self._queue_disjunction(pkg, dep_root, dep_priority, disjunctions)
+
def _queue_disjunction(self, pkg, dep_root, dep_priority, dep_struct):
self._dynamic_config._dep_disjunctive_stack.append(
(pkg, dep_root, dep_priority, dep_struct))