[packagekit] WhatProvides

Bastien Nocera hadess at hadess.net
Mon Mar 17 13:02:43 PDT 2008


On Mon, 2008-03-17 at 15:27 -0400, David Zeuthen wrote:
> On Mon, 2008-03-17 at 17:36 +0000, Richard Hughes wrote:
> > Comments?
> 
> I think you need to specify the media framework in the codec part since
> codecs are tied to a specific framework (e.g. gstreamer, xine and so
> on). 
> 
> So it's just like how device drivers are tied to a specific (lineage of
> the) kernel or OS (e.g. Linux 2.6, FreeBSD, Solaris).  Probably for
> drivers it's sane to assume only one kernel is used though. But you
> can't do that for codecs.
> 
> >From an API point of view I want to be able to write this code in my "I
> can haz codecs" application
> 
>   if (am_using_gstreamer) {
>     pk_get_codec ("gstreamer-0.10", "audio/mpeg");
>   } if (am_using_xine) else {
>     pk_get_codec ("xine-xyz", "audio/mpeg");
>   }
> 
> Or maybe I write
> 
>   if (am_using_gstreamer) {
>     pk_get_codec ("gstreamer-0.10/audio/mpeg");
>   } if (am_using_xine) else {
>     pk_get_codec ("xine-xyz/audio/mpeg");
>   }
> 
> I don't know. But your docs for this thing need to tell such
> applications writers what to do.

I'd rather that wasn't shown at all in the API.

The provides are completely arbitrary, and the scripting makes it
extensible (I could add a provides script that checks whether you wrote
an application, and add that to the provides, running
"pk-install-provides davidz" would install your apps).

Restricting the provides based on type means that adding provides types
to distros will require applications to be updated.




More information about the PackageKit mailing list