[packagekit] New PolicyKit requirements: heads up

Richard Hughes hughsient at gmail.com
Tue May 12 09:31:57 PDT 2009

As some of you may know, PolicyKit is to be replaced with PolicyKit1
in the next few months. The main developer is making PolicyKit1 a
similar thing to PolicyKit, but will be a daemon rather than a
library, and has pluggable backends and other goodness like that.

Most of the API is pretty similar, but the biggest change is that we
no longer have to do the method, handle, method shuffle like we used
to. This is a lot better, as it allows the front-ends calling into the
interface to not care about PolicyKit, and let the daemon handle the
session interactions.

Unfortunately, this would result in a synchronous operation (getting
the authorisation) blocking the daemon.

For this reason we will be using the async methods to communicate with
PolicyKit1. This poses another problem as now the transaction can be
scheduled, but pending authentication. Now, my solution to that would
be to introduce a "pending-authentication" state into a transaction,
and not add it to the transaction list until auth has happened. This
allows the user to cancel the auth without the transaction even being
run if required.

Now, all this conversion is being done in a local branch on my
computer, but please yell if you're interested and I'll push it as a
remote branch.

For clients using PackageKit-glib or PackageKit-qt there should be no
changes, just some tinkering in the daemon, and a whole load of new
self tests. I'll not merge this to master until we've got a new
PolicyKit1 release, as we don't want to exclude distros because of the
deps. I'll probably merge this in a few months assuming there are no
big problems.


More information about the PackageKit mailing list