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 <gentoo-commits+bounces-391790-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1RETEA-0002S0-MV
	for garchives@archives.gentoo.org; Thu, 13 Oct 2011 21:54:10 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 1EB1F21C1C6;
	Thu, 13 Oct 2011 21:53:58 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id D3EE621C1C6
	for <gentoo-commits@lists.gentoo.org>; Thu, 13 Oct 2011 21:53:57 +0000 (UTC)
Received: from pelican.gentoo.org (unknown [66.219.59.40])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 6E2851B4016
	for <gentoo-commits@lists.gentoo.org>; Thu, 13 Oct 2011 21:53:57 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id 893DF80042
	for <gentoo-commits@lists.gentoo.org>; Thu, 13 Oct 2011 21:53:56 +0000 (UTC)
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" <zmedico@gentoo.org>
Message-ID: <c2523b8833bcf0074f7446a5cbf165cf50f8aa2c.zmedico@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: bin/
X-VCS-Repository: proj/portage
X-VCS-Files: bin/quickpkg
X-VCS-Directories: bin/
X-VCS-Committer: zmedico
X-VCS-Committer-Name: Zac Medico
X-VCS-Revision: c2523b8833bcf0074f7446a5cbf165cf50f8aa2c
Date: Thu, 13 Oct 2011 21:53:56 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 
X-Archives-Hash: 1d3c67b2146537a41171c596b8592fea

commit:     c2523b8833bcf0074f7446a5cbf165cf50f8aa2c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 13 21:53:45 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Oct 13 21:53:45 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a=
=3Dcommit;h=3Dc2523b88

quickpkg: fix '*' in arg extended atom check

This check isn't really accurate due to the =3D* operator, and we don't
want to reject =3D* atoms when they omit the category.

---
 bin/quickpkg |   27 +++++++++++----------------
 1 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/bin/quickpkg b/bin/quickpkg
index 0982c4a..a326bd4 100755
--- a/bin/quickpkg
+++ b/bin/quickpkg
@@ -188,24 +188,12 @@ def quickpkg_set(options, infos, arg, eout):
 		quickpkg_atom(options, infos, atom, eout)
=20
=20
-def quickpkg_extended_atom(options, infos, arg, eout):
+def quickpkg_extended_atom(options, infos, atom, eout):
 	root =3D portage.settings["ROOT"]
 	trees =3D portage.db[root]
 	vartree =3D trees["vartree"]
 	vardb =3D vartree.dbapi
=20
-	try:
-		atom =3D Atom(arg, allow_wildcard=3DTrue, allow_repo=3DTrue)
-	except (InvalidAtom, InvalidData):
-		eout.eerror("Invalid atom: %s" % (arg,))
-		infos["missing"].append(arg)
-		return
-
-	if not atom.extended_syntax:
-		# =3D* operator
-		quickpkg_atom(options, infos, atom, eout)
-		return
-
 	require_metadata =3D atom.slot or atom.repo
 	atoms =3D []
 	for cpv in vardb.cpv_all():
@@ -248,10 +236,17 @@ def quickpkg_main(options, args, eout):
 	for arg in args:
 		if arg[0] =3D=3D SETPREFIX:
 			quickpkg_set(options, infos, arg, eout)
-		elif '*' in arg:
-			quickpkg_extended_atom(options, infos, arg, eout)
-		else:
+			continue
+		try:
+			atom =3D Atom(arg, allow_wildcard=3DTrue, allow_repo=3DTrue)
+		except (InvalidAtom, InvalidData):
+			# maybe it's valid but missing category (requires dep_expand)
 			quickpkg_atom(options, infos, arg, eout)
+		else:
+			if atom.extended_syntax:
+				quickpkg_extended_atom(options, infos, atom, eout)
+			else:
+				quickpkg_atom(options, infos, atom, eout)
=20
 	if not infos["successes"]:
 		eout.eerror("No packages found")