Thursday, December 06, 2007

PackageKit with zypp (alpha quality) backend for openSUSE 10.3

Thanks to rock-star thoenig we now have PackageKit (with zypp) building and installing in openSUSE 10.3.

If you're among the crazy who'd like to try this out, here's what you'll need to do:
  1. Add my openSUSE Build Service repository (Yast -> Software Repositories -> Add)
  2. Install the following packages from that repository (I don't specify ALL of them because the required ones should be picked up as dependencies automatically):
    • gnome-packagekit
    • PolicyKit-gnome
    • dbus-1
  3. Fix up the permissions on /lib/dbus-1/dbus-daemon-launch-helper
    • As root, run the following
      • chown root:messagebus /lib/dbus-1/dbus-daemon-launch-helper
      • chmod 770 /lib/dbus-1/dbus-daemon-launch-helper
      • chmod +s /lib/dbus-1/dbus-daemon-launch-helper
  4. Try a simple test to list your repos
    • As a standard user, run the following from a terminal
      • pkcon get repos (non-graphical version)
      • pk-repo (GUI version)
Some caveats/bewares:
  • Is this bug-free? Absolutely not! Please help! :)
  • Why do some simple actions take FOREVER? Well, probably two different reasons: 1) I am not really a libzypp expert and have probably written crappy code, 2) zypp does refreshes, iterates over all its packages, etc. for package resolution. I'm sure that over time, libzypp will be easier to use and faster.
  • Sometimes things are failing, why? `pkcon refresh` and `pkcon force-refresh` are two things I don't really have implemented correctly. Sometimes I've had to run (as root) `zypper refresh` just to kind of clean things up. PackageKit wants most things to NOT cause a refresh of your local repo cache (thank goodness).
  • I've only ever really tried installing pacakges that don't have any other uninstalled dependencies. You're on your own if you go beyond this.
Some things to try:
  • pk-application (This is the main GTK application for searching/installing/removing packages)
    • search for a simple package like lynx and try installing it
    • you'll see PolicyKit-gnome in action prompt you for a root password (woot!)
  • pkcon install lynx
    • command-line way to install a package
  • pkcon search name
    • command-line search for a package
  • pk-backend-status
    • GUI utility to show you what PackageKit backend methods we've implemented (or at least started)
    • `pkcon get actions` is the command-line equivalent
  • pk-transaction-viewer
    • GUI utility to show you all the transactions (installs, uninstallls) you've done using PackageKit
More information:
  • More developer information about writing a Package Kit backend can be found here: http://www.packagekit.org/pk-reference.html
  • Want to help out? Join #PackageKit on irc.freenode.net. I'm usually there (btimothy)...at least during the day.
Okay, back to figuring out how to get a list of dependencies from zypp...

No comments: