[packagekit] Dealing with distro upgrades

Richard Hughes hughsient at gmail.com
Thu Sep 11 06:39:15 PDT 2008


At the moment PackageKit detects the distro upgrades if the backend
supports them, and then reports it to the user with a bubble like this:

http://www.packagekit.org/img/gpk-distro-upgrade-notify.png

This displays a "More information" bubble that the user can click on.

For Fedora, I'm going to execute preupgrade when this button is clicked,
and if the preupgrade is not available then I'll just point them at the
website and let the user do the rest.

This is all done in the user session, so preupgrade will then ask for
the root password (as it's using console helper, hopefully someday it'll
use PolicyKit) and the upgrade will continue.

This is all very fedora specific. What I'm suggesting is the "more
information" button just launches upgrade-distro.sh which the distros
can patch like the hal scripts are patched.

This would look something like this:

#!/bin/sh

# Fedora uses preupgrade
if [ -e /etc/fedora-release ]; then
	if [ -x /usr/bin/preupgrade ]; then
		/usr/bin/preupgrade
	else
		gnome-open http://fedoraproject.org/en/get-fedora
	fi
fi

This can either be shipped by gnome-packagekit, or by PackageKit. The
latter might make more sense, as it saves patching kpowersave as well.

What do you other guys think?

Richard.




More information about the PackageKit mailing list