[packagekit] Detecting when we need to restart the session

Richard Hughes hughsient at gmail.com
Tue Oct 14 06:45:39 PDT 2008


At the moment, a few of the backends send the RequireRestart signal to
client applications. The yum backend in particular gets the data from
bohdi, and then this data is used to advise the use they will need to
restart because of kernel updates and the like. Other backends may just
have blacklists, I'm not sure.

In the API, there's also the options of a session and application
restart. The former means a log out and log in, and the latter means
just restarting the application.

This probably isn't a backend thing, as if a program binary is modified
then we need to restart for the changes to be affected. This depends on
the binary actually running.

The attached patch queries the backend for the file lists of the updated
packages, and then checks to see if any executable files of that name
are in use. If so, it send a session restart signal.

Ideally, we would query the desktop files to see if the user can restart
the application (people can easily restart openoffice, but not
gnome-session), but I wanted to get some feedback about this idea first.

It adds a few seconds to a moderately large update system method, but
distros could turn this off in the config file if it takes too long.

Comments welcome. Good idea? Nothing in git yet.

Richard.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pk-detect-session-restarts.patch
Type: text/x-patch
Size: 7745 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20081014/d2967f31/attachment-0004.bin>


More information about the PackageKit mailing list