diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-07-18 14:38:09 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-07-18 14:38:09 -0700 |
commit | 30ec783c0fc64a02fda38980bded22dc0055a42d (patch) | |
tree | b025a74c77ced261b2f38f1ae954043757ede558 /bin | |
parent | 2472be18586f41c6e74a6d1f6a88c17a415eca9b (diff) | |
download | portage-30ec783c0fc64a02fda38980bded22dc0055a42d.tar.gz portage-30ec783c0fc64a02fda38980bded22dc0055a42d.tar.bz2 portage-30ec783c0fc64a02fda38980bded22dc0055a42d.zip |
Fix extended atom match for =* operator.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/portageq | 12 | ||||
-rwxr-xr-x | bin/quickpkg | 13 |
2 files changed, 11 insertions, 14 deletions
diff --git a/bin/portageq b/bin/portageq index 280fe94c2..d9abb0bad 100755 --- a/bin/portageq +++ b/bin/portageq @@ -583,17 +583,15 @@ def match(argv): require_metadata = atom.slot or atom.repo for cpv in vardb.cpv_all(): - if not portage.dep.extended_cp_match( - atom.cp, portage.cpv_getkey(cpv)): + if not portage.match_from_list(atom, [cpv]): continue if require_metadata: - slot, repo = vardb.aux_get(cpv, ["SLOT", "repository"]) - - if atom.slot is not None and atom.slot != slot: + try: + cpv = vardb._pkg_str(cpv, atom.repo) + except (KeyError, portage.exception.InvalidData): continue - - if atom.repo is not None and atom.repo != repo: + if not portage.match_from_list(atom, [cpv]): continue results.append(cpv) diff --git a/bin/quickpkg b/bin/quickpkg index a6bd4d4bd..76259c5c1 100755 --- a/bin/quickpkg +++ b/bin/quickpkg @@ -21,7 +21,7 @@ except ImportError: from portage import os from portage import xpak from portage.dbapi.dep_expand import dep_expand -from portage.dep import Atom, extended_cp_match, use_reduce +from portage.dep import Atom, use_reduce from portage.exception import (AmbiguousPackageName, InvalidAtom, InvalidData, InvalidDependString, PackageSetNotFound, PermissionDenied) from portage.util import ConfigProtect, ensure_dirs, shlex_split @@ -204,16 +204,15 @@ def quickpkg_extended_atom(options, infos, atom, eout): atoms.append(cpv_atom) continue - if not extended_cp_match(atom.cp, cpv_atom.cp): + if not portage.match_from_list(atom, [cpv]): continue if require_metadata: - slot, repo = vardb.aux_get(cpv, ["SLOT", "repository"]) - - if atom.slot and atom.slot != slot: + try: + cpv = vardb._pkg_str(cpv, atom.repo) + except (KeyError, InvalidData): continue - - if atom.repo and atom.repo != repo: + if not portage.match_from_list(atom, [cpv]): continue atoms.append(cpv_atom) |