[packagekit] Bundles

Elliot Peele elliot at bentlogic.net
Wed Jun 4 11:28:46 PDT 2008

On Wed, Jun 04, 2008 at 04:55:41PM +0100, Richard Hughes wrote:
> We talked very recently about one click install files, and how people
> were much more comfortable installing distro provided packages when the
> distro provides a package natively.
> There's one use case that I'm very interested in, and that is getting
> new users with the correct environment to build and start hacking on
> software.
> For instance, on www.packagekit.org in the FAQ section, we can have an
> entry:
> Q: What development files do you need to compile PackageKit?
> A: Click <a href="packagekit.bundle>here</a> to get started.
> Now, this .bundle file would be handled by a PackageKit helper
> (gpk-install-bundle) that would parse this file and cause the
> appropriate packages to be installed if they are not already installed.
> This rocks as we can get GTK+, Xorg hackers up to speed with the minimum
> of fuss. It also lets people put links on webpages to "install all the
> stuff you need" when writing a "how to use a scanner in GIMP" howto.
> So, what does a .bundle file look like?
> ____________________________________________________________________________________
> [PackageKit Bundle]
> # Just a package on all versions of fedora that can provide the dependency.
> # If there are multiple packages then the user will be asked to choose
> InstallProvides(fedora)=audio/QCELP
> # Just for Fedora 9, install two development files
> InstallPackages(fedora-9)=glib2-devel;PolicyKit-gnome-devel
> # On any distro, install the package with this file
> InstallFiles=/usr/bin/fontinst
> # For each architecture on Fedora 8, install one of the two different compat files
> InstallFiles(fedora-8-i686)=/usr/lib/pango/1.6.0/modules/pango-arabic-fc.so
> InstallFiles(fedora-8-x64)=/usr/lib64/pango/1.6.0/modules/pango-arabic-fc.so
> ____________________________________________________________________________________
> You'll notice the bit in the ()'s - this lets a distro fine tune the
> packagename, where for instance in Debian it's called policykit and
> Fedora PolicyKit.
> The bit's in between the () is the distro-id - which we also use in
> other places already. PK will process all the entries that apply, with
> the depth specified by the number of dashes.
> There's also no version checking - intentionally - the distro should be
> specified and have the correct data. If there's an optional package not
> in earlier versions then you can do something like this:
> ____________________________________________________________________________________
> [PackageKit Bundle]
> # Fedora 9 does not have Unique
> InstallPackages(fedora-9)=glib2-devel;gvfs-devel;dbus-glib-devel;NetworkManager-glib-devel;PolicyKit-devel;gtk2-devel;libsexy-devel;libglade2-devel;libnotify-devel;PolicyKit-gnome-devel
> # Rawhide is fedora 9.90
> InstallPackages(fedora-9.90)=glib2-devel;gvfs-devel;dbus-glib-devel;NetworkManager-glib-devel;PolicyKit-devel;gtk2-devel;libsexy-devel;libglade2-devel;libnotify-devel;PolicyKit-gnome-devel;unique-devel
> ____________________________________________________________________________________
> There's also no description of the bundle that needs localising, or any
> kind of introduction that needs translating and verifying - they are
> just lists of packages, files and provides that might be useful. All the
> translations come from the distro metadata, and it's up to the user to
> verify the package lists that are asked to be installed.
> Note: this isn't designed to replace one click install, it just does
> something that is similar in a different way. We can layer on a OCI
> layer later (if people want to) for stuff not in core repos when we add
> RepoAdd and RepoRemove.
> Nothing is in git yet, although I have a working prototype in a local
> branch. Comments and suggestions welcome.

Why not just do pure file requires? Package names are in no way
consistent between distros.


Elliot Peele
elliot at bentlogic.net

More information about the PackageKit mailing list