[packagekit] get_categories function

Richard Hughes hughsient at gmail.com
Mon Jun 1 00:54:12 PDT 2009


On Sun, May 31, 2009 at 10:58 AM, Mounir Lamouri
<mounir.lamouri at gmail.com> wrote:
> get_categories is used only by yum.
> According to the doc this function returns collection categories. What does it
> mean ? What are collections ?

Categories are specific vendor specific set of packages. So, for
instance the "Server Software" _GROUP_ for the yum backend contains
thousands of entries. There are only designed to be a few groups,
maybe 10-15 in total. A group list is also a flat list, not
hierarchical, and has to be mapped to a predefined enum.

A category is a small vendor named set of packages, usually very
specific. For instance, a category can be "KDE administration
software". Categories can be chained together to form a hierarchical
list, and can have custom icons and custom translations.

So, for yum:

[hughsie at localhost ~]$ pkcon get-groups
admin-tools
desktop-gnome
desktop-kde
desktop-other
desktop-xfce
education
fonts
games
graphics
internet
legacy
localization
multimedia
office
other
programming
publishing
servers
system
virtualization
collections
newest

[hughsie at localhost ~]$ pkcon get-categories
Category: Desktop Environments
 ID: desktops
 Name: Desktop Environments
 Summary: Desktop environments
 Icon: desktops
Category: GNOME Desktop Environment
 ID: @gnome-desktop
 Parent: desktops
 Name: GNOME Desktop Environment
 Summary: GNOME is a powerful graphical user interface which includes
a panel, desktop, system icons, and a graphical file manager.
 Icon: gnome-desktop
Category: KDE (K Desktop Environment)
 ID: @kde-desktop
 Parent: desktops
 Name: KDE (K Desktop Environment)
 Summary: KDE is a powerful graphical user interface which includes a
panel, desktop, system icons, and a graphical file manager.
 Icon: kde-desktop

Only a couple of backends have categories, as the front end tools fall
back to groups automatically if they are not available.

Hope that helps,

Richard.



More information about the PackageKit mailing list