public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/dep/
Date: Wed, 13 Apr 2011 07:52:14 +0000 (UTC)	[thread overview]
Message-ID: <6b9995f6cf4d043cd8b79b56b4c021a375d11995.zmedico@gentoo> (raw)

commit:     6b9995f6cf4d043cd8b79b56b4c021a375d11995
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 11 22:30:13 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Apr 13 07:50:25 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6b9995f6

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 that need to be disabled
 	"""
+	useflag_re = _get_useflag_re(None)
 	mysplit = mystr.split()
 	level = 0
 	stack = [[]]
@@ -2322,9 +2323,10 @@ def extract_affecting_use(mystr, atom):
 		else:
 			flag = conditional[:-1]
 
-		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))
 
 		return flag
 
@@ -2397,7 +2399,7 @@ def extract_affecting_use(mystr, atom):
 			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)
 



             reply	other threads:[~2011-04-13  7:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13  7:52 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-03-18 21:12 [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/dep/ Zac Medico
2011-02-20  0:04 Zac Medico
2011-02-08 20:48 Zac Medico
2011-02-08  0:54 Zac Medico
2011-02-08  0:54 Zac Medico
2011-02-08  0:54 Zac Medico
2011-02-08  0:54 Zac Medico
2011-02-05  0:59 Zac Medico
2011-02-05  0:59 Zac Medico
2011-02-04  6:33 zmedico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6b9995f6cf4d043cd8b79b56b4c021a375d11995.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox