[packagekit] Supporting plugins search and installation

James Antill james at fedoraproject.org
Mon Feb 8 12:04:26 PST 2010


On Sun, 2010-02-07 at 16:38 +0100, Naba kumar wrote:
> Hi, 
> 
> In Anjuta, we are hoping to make things easy for users to find and
> install plugins, something akin to how firefox addons are managed.
> Clearly, it's best to be done with packagekit. This is something many
> other applications with plugin/extensions support will benefit without
> reinventing wheels. 
> 
> In typical setup, these plugins are referenced using some kind of
> metafile. For example in Anjuta we have /usr/lib/anjuta/*.plugin
> files. They can come from any arbitrary sources and are supposedly
> already available in distro repository. 
> 
> What would be nice is to have wild card search capability in
> packagekit API for provides and supported by all the backends. In
> Anjuta for example, user can select "Get more plugins" and it can then
> find/list all packages providing "*/anjuta/*.plugin" files. 

 In yum this would be a simple searchProvides(), which in theory is
mapped to PK's "what_provides" API. However PK explicitly disallows '*'
among other characters (via. pk_transaction_search_check()).
 I assume this is intended, as other backends might not be able to
provide this functionality easily.

 I'd say that probably your best bet would be to "de facto standardize"
something like the fonts or mime-type provides. So anything providing an
Anjuta plugin file would provide something like (just making something
really simple up):

Provides: Anjuta-plugin

...then you could do a search on the bare provides name. A hackier way
(which might have easier to use APIs) would be to (ab)use the mime-types
like:

Provides: mimehandler(application/x-anjuta-plugin)

-- 
James Antill - james at fedoraproject.org
http://yum.baseurl.org/wiki/releases
http://yum.baseurl.org/wiki/whatsnew/3.2.26
http://yum.baseurl.org/wiki/YumMultipleMachineCaching



More information about the PackageKit mailing list