[packagekit] Filtering per-repo

Richard Hughes hughsient at gmail.com
Wed Dec 8 01:52:15 PST 2010


One thing I've been asked to support in RHEL is the concept of showing
the packages that belong in each repo. Obviously I want to do this
properly, and not just hack a RH specific kludge into yumBackend.py as
it's probably applicable for other user cases and for other distros.

As I see things there are a few was to achieve this with the current API:

1. Add additional data to the filter string, e.g. "~devel;arch;repo:rawhide"
2. Make SearchGroup understand the "repo:rawhide" string to return all
packages from a specific repository
3. Support a optional extension to the Category object, where virtual
categories are created for each repo, and combine this with idea 2.

Idea 1 has the drawback that we represent the filter list internally
as a bitfield (everywhere!), and it would be quite a large change
internally to switch this to a free text field. This does have the
advantage that we can search within a repo, so we could do a
"SearchDetails('virt') on repo:fedora" for instance.

Idea 2 is probably the easiest way to do this from a code change point
of view but feels the hackiest.

Idea 3 gives the user a few more groups in the tree menu in
gpk-application, and probably clutters the UI with functionality most
people don't want. This might look something like this:

 [>] Applications
 [>] Games
 [>] System tools
 [>] System sources

which expands to:

....
 \ System sources
 - Development packages for Fedora
 - Additional non-free packages
 - Debuginfo packages

This seems to be as most discoverable, but might be too much clutter.
One positive approach for this, is that we default (at least in GNOME)
to the simple enum-based group list, and leave this to the user to
enable the "advanced" tree-view group mode (which we do automatically
for RHEL).

Other ideas very welcome.

Richard.



More information about the PackageKit mailing list