summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-02-07 13:59:23 -0800
committerZac Medico <zmedico@gentoo.org>2011-02-07 16:53:16 -0800
commitca57018f8dd8d65f2df5c5df636c2cd7db8445d9 (patch)
tree61390df7a05069173554f3e0ded8591b09a70171
parentebuild.5: fix spelling of "defaults" (diff)
downloadportage-ca57018f8dd8d65f2df5c5df636c2cd7db8445d9.tar.gz
portage-ca57018f8dd8d65f2df5c5df636c2cd7db8445d9.tar.bz2
portage-ca57018f8dd8d65f2df5c5df636c2cd7db8445d9.zip
paren_reduce: allow parens in atoms, for EAPI 4
This will fix bug #354003.
-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 = (