summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dep/__init__.py2
-rw-r--r--pym/portage/tests/dep/test_paren_reduce.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py
index cf83e0a0a..a8d05f1f7 100644
--- a/pym/portage/dep/__init__.py
+++ b/pym/portage/dep/__init__.py
@@ -178,7 +178,7 @@ def paren_reduce(mystr):
need_bracket = True
stack[level].append(token)
else:
- if need_bracket or "(" in token or ")" in token or "|" in token:
+ if need_bracket:
raise InvalidDependString(
_("malformed syntax: '%s'") % mystr)
diff --git a/pym/portage/tests/dep/test_paren_reduce.py b/pym/portage/tests/dep/test_paren_reduce.py
index 6aac955c5..a7bbf974b 100644
--- a/pym/portage/tests/dep/test_paren_reduce.py
+++ b/pym/portage/tests/dep/test_paren_reduce.py
@@ -30,6 +30,8 @@ class TestParenReduce(TestCase):
( "|| ( ( A B ) C )", [ "||", [ ["A", "B"], "C"] ]),
( "|| ( ( A B ) ( C ) )", [ "||", [ ["A", "B"], "C"] ]),
+ # test USE dep defaults for bug #354003
+ ( ">=dev-lang/php-5.2[pcre(+)]", [ ">=dev-lang/php-5.2[pcre(+)]" ]),
)
test_cases_xfail = (