From: Zac Medico Date: Thu, 13 Oct 2011 21:53:45 +0000 (-0700) Subject: quickpkg: fix '*' in arg extended atom check X-Git-Tag: v2.2.0_alpha68~60 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c2523b8833bcf0074f7446a5cbf165cf50f8aa2c;p=portage.git 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. --- 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")