summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dep/__init__.py2
-rw-r--r--pym/portage/tests/dep/testCheckRequiredUse.py18
2 files changed, 19 insertions, 1 deletions
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py
index 5b0473389..8bbcd3e59 100644
--- a/pym/portage/dep/__init__.py
+++ b/pym/portage/dep/__init__.py
@@ -1735,7 +1735,7 @@ def check_required_use(required_use, use, iuse_match):
ignore = True
if l and not ignore:
- stack[level].extend(l)
+ stack[level].append(all(x for x in l))
else:
raise portage.exception.InvalidDependString(
_("malformed syntax: '%s'") % required_use)
diff --git a/pym/portage/tests/dep/testCheckRequiredUse.py b/pym/portage/tests/dep/testCheckRequiredUse.py
index 9468ca394..4b67d6250 100644
--- a/pym/portage/tests/dep/testCheckRequiredUse.py
+++ b/pym/portage/tests/dep/testCheckRequiredUse.py
@@ -73,6 +73,24 @@ class TestCheckRequiredUse(TestCase):
( "^^ ( || ( a b ) ^^ ( b c ) )", ["a", "c"], ["a", "b", "c"], False),
( "^^ ( || ( a b ) ^^ ( b c ) )", ["b", "c"], ["a", "b", "c"], True),
( "^^ ( || ( a b ) ^^ ( b c ) )", ["a", "b", "c"], ["a", "b", "c"], True),
+
+ ( "|| ( ( a b ) c )", ["a", "b", "c"], ["a", "b", "c"], True),
+ ( "|| ( ( a b ) c )", ["b", "c"], ["a", "b", "c"], True),
+ ( "|| ( ( a b ) c )", ["a", "c"], ["a", "b", "c"], True),
+ ( "|| ( ( a b ) c )", ["a", "b"], ["a", "b", "c"], True),
+ ( "|| ( ( a b ) c )", ["a"], ["a", "b", "c"], False),
+ ( "|| ( ( a b ) c )", ["b"], ["a", "b", "c"], False),
+ ( "|| ( ( a b ) c )", ["c"], ["a", "b", "c"], True),
+ ( "|| ( ( a b ) c )", [], ["a", "b", "c"], False),
+
+ ( "^^ ( ( a b ) c )", ["a", "b", "c"], ["a", "b", "c"], False),
+ ( "^^ ( ( a b ) c )", ["b", "c"], ["a", "b", "c"], True),
+ ( "^^ ( ( a b ) c )", ["a", "c"], ["a", "b", "c"], True),
+ ( "^^ ( ( a b ) c )", ["a", "b"], ["a", "b", "c"], True),
+ ( "^^ ( ( a b ) c )", ["a"], ["a", "b", "c"], False),
+ ( "^^ ( ( a b ) c )", ["b"], ["a", "b", "c"], False),
+ ( "^^ ( ( a b ) c )", ["c"], ["a", "b", "c"], True),
+ ( "^^ ( ( a b ) c )", [], ["a", "b", "c"], False),
)
test_cases_xfail = (