portageq best_visible: use match-all-cpv-only
authorZac Medico <zmedico@gentoo.org>
Fri, 23 Sep 2011 21:00:26 +0000 (14:00 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 23 Sep 2011 21:00:26 +0000 (14:00 -0700)
bin/portageq

index 3ae29d13f6213fab5adc4147964ba69513b30872..b416b66c5e915e4a96d3afcfee31f43091b8203f 100755 (executable)
@@ -464,7 +464,7 @@ def best_visible(argv):
                portage.db[portage.settings["ROOT"]], None)
 
        if hasattr(db, "xmatch"):
-               cpv_list = db.xmatch("match-all", atom)
+               cpv_list = db.xmatch("match-all-cpv-only", atom)
        else:
                cpv_list = db.match(atom)
 
@@ -472,7 +472,9 @@ def best_visible(argv):
                # reversed, for descending order
                cpv_list.reverse()
                # verify match, since the atom may match the package
-               # for a given cpv from one repo but not another
+               # for a given cpv from one repo but not another, and
+               # we can use match-all-cpv-only to avoid redundant
+               # metadata access.
                atom_set = InternalPackageSet(initial_atoms=(atom,))
 
                if atom.repo is None and hasattr(db, "getRepositories"):