aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-02-04 14:59:28 -0800
committerZac Medico <zmedico@gentoo.org>2011-02-04 14:59:28 -0800
commit3b72417b30868335b3314559028f04a62a4b5521 (patch)
treeba4e610fc098f24e20075dfc34db3e1104e22ce0 /pym/portage/dep
parentcheck_required_use: clarify operator logic (diff)
downloadportage-3b72417b30868335b3314559028f04a62a4b5521.tar.gz
portage-3b72417b30868335b3314559028f04a62a4b5521.tar.bz2
portage-3b72417b30868335b3314559028f04a62a4b5521.zip
REQUIRED_USE: fix single child conditionals disp
Diffstat (limited to 'pym/portage/dep')
-rw-r--r--pym/portage/dep/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py
index b429e5617..6b125f04c 100644
--- a/pym/portage/dep/__init__.py
+++ b/pym/portage/dep/__init__.py
@@ -2226,15 +2226,14 @@ def check_required_use(required_use, use, iuse_match):
node._parent._children.append(child)
if isinstance(child, _RequiredUseBranch):
child._parent = node._parent
- node = node._parent
- continue
- if not node._children:
+ elif not node._children:
last_node = node._parent._children.pop()
if last_node is not node:
raise AssertionError(
"node is not last child of parent")
- elif len(node._children) == 1:
+
+ elif len(node._children) == 1 and op in ("||", "^^"):
last_node = node._parent._children.pop()
if last_node is not node:
raise AssertionError(
@@ -2243,6 +2242,7 @@ def check_required_use(required_use, use, iuse_match):
if isinstance(node._children[0], _RequiredUseBranch):
node._children[0]._parent = node._parent
node = node._children[0]
+
else:
for index, child in enumerate(node._children):
if isinstance(child, _RequiredUseBranch) and \