[packagekit] Detecting when we need to restart the session

James Antill james at fedoraproject.org
Tue Oct 14 07:29:39 PDT 2008


On Tue, 2008-10-14 at 14:45 +0100, Richard Hughes wrote:
> 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.

 Why does that make it not a backend thing? Why would we want different
behaviour on updates from PackageKit vs. cmd line (or cron, or
whatever)?
 The other problem is that Linux is multi-user and with fast user
switching etc. it's fairly easy for the user installing the updates with
the GUI to not be the only user on a desktop on the machine.

 Ideally IMO this should be in the packages, in the same way
bind/apache-httpd does service condrestart ... firefox/openoffice could
do a similar thing.

> 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.

 Also I've seen firefox lose data you've typed into a form on session
restart, which is another good reason to make this opt in per. package
IMO.

-- 
James Antill <james at fedoraproject.org>
Fedora



More information about the PackageKit mailing list