Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dep/
Date: Fri, 04 Feb 2011 23:04:30
Message-Id: 3b72417b30868335b3314559028f04a62a4b5521.zmedico@gentoo
1 commit: 3b72417b30868335b3314559028f04a62a4b5521
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 4 22:59:28 2011 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 4 22:59:28 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3b72417b
7
8 REQUIRED_USE: fix single child conditionals disp
9
10 ---
11 pym/portage/dep/__init__.py | 8 ++++----
12 1 files changed, 4 insertions(+), 4 deletions(-)
13
14 diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py
15 index b429e56..6b125f0 100644
16 --- a/pym/portage/dep/__init__.py
17 +++ b/pym/portage/dep/__init__.py
18 @@ -2226,15 +2226,14 @@ def check_required_use(required_use, use, iuse_match):
19 node._parent._children.append(child)
20 if isinstance(child, _RequiredUseBranch):
21 child._parent = node._parent
22 - node = node._parent
23 - continue
24
25 - if not node._children:
26 + elif not node._children:
27 last_node = node._parent._children.pop()
28 if last_node is not node:
29 raise AssertionError(
30 "node is not last child of parent")
31 - elif len(node._children) == 1:
32 +
33 + elif len(node._children) == 1 and op in ("||", "^^"):
34 last_node = node._parent._children.pop()
35 if last_node is not node:
36 raise AssertionError(
37 @@ -2243,6 +2242,7 @@ def check_required_use(required_use, use, iuse_match):
38 if isinstance(node._children[0], _RequiredUseBranch):
39 node._children[0]._parent = node._parent
40 node = node._children[0]
41 +
42 else:
43 for index, child in enumerate(node._children):
44 if isinstance(child, _RequiredUseBranch) and \