portage.dbapi.IndexedVardb module

class portage.dbapi.IndexedVardb.IndexedVardb(vardb)

Bases: object

A vardbapi interface that sacrifices validation in order to improve performance. It takes advantage of vardbdbapi._aux_cache, which is backed by vdb_metadata.pickle. Since _aux_cache is not updated for every single merge/unmerge (see _aux_cache_threshold), the list of packages is obtained directly from the real vardbapi instance. If a package is missing from _aux_cache, then its metadata is obtained using the normal (validated) vardbapi.aux_get method.

For performance reasons, the match method only supports package name and version constraints.

_copy_attrs = ('cpv_exists', '_aux_cache_keys', '_cpv_sort_ascending')
_iter_cp_all()
aux_get(cpv, attrs, myrepo=None)
cp_all(sort=True)

Returns an ordered iterator instead of a list, so that search results can be displayed incrementally.

match(atom)

For performance reasons, only package name and version constraints are supported, and the returned list is unordered.

match_unordered = True