[packagekit] extremely quick search for available package names matching a pattern

Lukas Vacek lucas.vacek at gmail.com
Sat Apr 13 18:14:26 PDT 2013


Hello there,

I am developing a Gnome Shell extension which shows available software to
install. The user can type, for example, "opent" and then just click
"openttd" to install the package. It's pretty decent. :-)
https://extensions.gnome.org/extension/95/appsearch/

This works all fine on Debian/Ubuntu using "apt-cache pkgnames [ prefix ]".
I am doing my best to support PackageKit as well but getting the results
fast enough is a bit problematic.

At the moment I use "pkcon -p resolve <search_term>" which is very quick
and works fine, however, this works only for exact matches.

I have experimented with "pkcon -p search name <search_term>" and indeed it
works fine but it's just too slow for this use case :-( ... it can take up
to several  (sometimes more than 5) seconds to get results.

Is there a faster way to get all available packages with names matching a
pattern? (No need for regex or so, actually, just prefix match will do)

Thanks!
Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20130414/e94907a2/attachment.html>


More information about the PackageKit mailing list