[packagekit] Backend API Thought.
tla at rasmil.dk
Fri Oct 26 06:49:31 PDT 2007
Richard Hughes wrote:
> On Fri, 2007-10-26 at 15:23 +0200, Tim Lauridsen wrote:
>> I have done a little thinking about what could be useful to have in the
>> packagekit backend API.
>> * get-group-list : Get a list groups found in the repositories.
>> To make it possible to make dynamic group view in a frontend client.
>> (search-group should be used to get the packages in the groups)
> We already have this; see backend_get_groups:
> * backend_get_groups:
> static void
> backend_get_groups (PkBackend *backend, PkEnumList *elist)
> g_return_if_fail (backend != NULL);
> pk_enum_list_append_multiple (elist,
>> group<tab>categoryid;groupid<tab>translated categoryname;translated
>> groupname<tab>translated group describtion
> We can't have any translations done by the daemon, they all have to be
> enumerated types - the daemon has to be C locale, and the client
> converts the enums to localised text. It's the same as what we do with
>> called text editors, these are programs that allow you to create and
>> edit files. These include Emacs and Vi."
> The translations can be done in pk-common-gui.c in gnome-packagekit - we
> can add as many translations and enumerated values there are you like. I
> don't mind making the translators work harder :-)
The problem is in yum you have dynamic Category/Groups defined in a
comps.xml file loaded from the repositories.
The comps files from different repos is joined into one category/group tree.
The Category/Group contains a id and a descriptive name and a translated
names & decriptions all stored in the comps.xml files.
These can not easily, be mapped to the enumerated groups used by packagekit.
There translation is done in the comps files, so the backend dont need
to that translation, it just passes on the translation
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PackageKit