summaryrefslogtreecommitdiffstats
path: root/bin/quickpkg
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-10-13 14:53:45 -0700
committerZac Medico <zmedico@gentoo.org>2011-10-13 14:53:45 -0700
commitc2523b8833bcf0074f7446a5cbf165cf50f8aa2c (patch)
treefeffe095b97cf3b613566df03ba82bd16afc6067 /bin/quickpkg
parent5c7bf4eb09f644813a6f017ffd91665664142560 (diff)
downloadportage-c2523b8833bcf0074f7446a5cbf165cf50f8aa2c.tar.gz
portage-c2523b8833bcf0074f7446a5cbf165cf50f8aa2c.tar.bz2
portage-c2523b8833bcf0074f7446a5cbf165cf50f8aa2c.zip
quickpkg: fix '*' in arg extended atom check
This check isn't really accurate due to the =* operator, and we don't want to reject =* atoms when they omit the category.
Diffstat (limited to 'bin/quickpkg')
-rwxr-xr-xbin/quickpkg27
1 files changed, 11 insertions, 16 deletions
diff --git a/bin/quickpkg b/bin/quickpkg
index 0982c4a80..a326bd44a 100755
--- a/bin/quickpkg
+++ b/bin/quickpkg
@@ -188,24 +188,12 @@ def quickpkg_set(options, infos, arg, eout):
quickpkg_atom(options, infos, atom, eout)
-def quickpkg_extended_atom(options, infos, arg, eout):
+def quickpkg_extended_atom(options, infos, atom, eout):
root = portage.settings["ROOT"]
trees = portage.db[root]
vartree = trees["vartree"]
vardb = vartree.dbapi
- try:
- atom = Atom(arg, allow_wildcard=True, allow_repo=True)
- except (InvalidAtom, InvalidData):
- eout.eerror("Invalid atom: %s" % (arg,))
- infos["missing"].append(arg)
- return
-
- if not atom.extended_syntax:
- # =* operator
- quickpkg_atom(options, infos, atom, eout)
- return
-
require_metadata = atom.slot or atom.repo
atoms = []
for cpv in vardb.cpv_all():
@@ -248,10 +236,17 @@ def quickpkg_main(options, args, eout):
for arg in args:
if arg[0] == SETPREFIX:
quickpkg_set(options, infos, arg, eout)
- elif '*' in arg:
- quickpkg_extended_atom(options, infos, arg, eout)
- else:
+ continue
+ try:
+ atom = Atom(arg, allow_wildcard=True, allow_repo=True)
+ 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)
if not infos["successes"]:
eout.eerror("No packages found")