From: Zac Medico Date: Mon, 7 Feb 2011 21:59:23 +0000 (-0800) Subject: paren_reduce: allow parens in atoms, for EAPI 4 X-Git-Tag: v2.2.0_alpha22~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8735222b77e66850213e2aa6a7ea48e744ba0d4f;p=portage.git paren_reduce: allow parens in atoms, for EAPI 4 This will fix bug #354003. --- 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 = (