summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2010-08-18 15:50:53 +0200
committerZac Medico <zmedico@gentoo.org>2010-08-18 06:54:55 -0700
commit14c7b1773dea0961a6c718dc72ab3cf20c9554a9 (patch)
tree1fa5f37c79b050cd10316de8112482435bd27fbe
parent2296821c2b877bb70b0f04e1a621ed87fc1319a5 (diff)
downloadportage-14c7b1773dea0961a6c718dc72ab3cf20c9554a9.tar.gz
portage-14c7b1773dea0961a6c718dc72ab3cf20c9554a9.tar.bz2
portage-14c7b1773dea0961a6c718dc72ab3cf20c9554a9.zip
check_required_use: Fix the same bug as in use_reduce
-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 = (