Fix use_reduce() case from bug #340973.
[portage.git] / pym / portage / dep / __init__.py
index b829e80451af7605e69995455d9aa2b7030d3470..4de9c8422a59ef32068df0730fe530bc92a8619f 100644 (file)
@@ -441,8 +441,11 @@ def use_reduce(depstr, uselist=[], masklist=[], matchall=False, excludeall=[], i
                                                if opconvert and ends_in_any_of_dep(level):
                                                        #In opconvert mode, we have to move the operator from the level
                                                        #above into the current list.
-                                                       stack[level].pop()
-                                                       stack[level].append(["||"] + l)
+                                                       if l[0] == '||':
+                                                               stack[level].extend(l[1:])
+                                                       else:
+                                                               stack[level].pop()
+                                                               stack[level].append(["||"] + l)
                                                else:
                                                        special_append()