From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q9PdM-0005ye-K3 for garchives@archives.gentoo.org; Mon, 11 Apr 2011 22:31:00 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B8CBFE002F; Mon, 11 Apr 2011 22:30:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 85D0BE002F for ; Mon, 11 Apr 2011 22:30:52 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0FD8A1B40D5 for ; Mon, 11 Apr 2011 22:30:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 10CAF80065 for ; Mon, 11 Apr 2011 22:30:51 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dep/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dep/__init__.py X-VCS-Directories: pym/portage/dep/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: f6773621ee2b8aa617be8b8a9724e74bf65079b9 Date: Mon, 11 Apr 2011 22:30:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 0bc53167eb377fbf8ca10a22b350a28d commit: f6773621ee2b8aa617be8b8a9724e74bf65079b9 Author: Zac Medico gentoo org> AuthorDate: Mon Apr 11 22:30:13 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Apr 11 22:30:13 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Df6773621 extract_affecting_use: allow parens in atoms This fixes bug #363073 in which an InvalidDependString exception is erroneously triggered by atoms containing EAPI 4 USE dependency defaults. This case is very similar to bug #354003 which was fixed in commit 8735222b77e66850213e2aa6a7ea48e744ba0d4f. --- pym/portage/dep/__init__.py | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index a92b481..5911c8c 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -2310,6 +2310,7 @@ def extract_affecting_use(mystr, atom): @rtype: Tuple of two lists of strings @return: List of use flags that need to be enabled, List of use flag th= at need to be disabled """ + useflag_re =3D _get_useflag_re(None) mysplit =3D mystr.split() level =3D 0 stack =3D [[]] @@ -2322,9 +2323,10 @@ def extract_affecting_use(mystr, atom): else: flag =3D conditional[:-1] =20 - if not flag: + if useflag_re.match(flag) is None: raise InvalidDependString( - _("malformed syntax: '%s'") % mystr) + _("invalid use flag '%s' in conditional '%s'") % \ + (flag, conditional)) =20 return flag =20 @@ -2397,7 +2399,7 @@ def extract_affecting_use(mystr, atom): need_bracket =3D 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) =20