It would be great if PackageKit could detect processes that need to be restarted after upgrades of packages they depend on. Examples of this situation are when a library gets a security upgrade and system daemons need to be restarted to pick up the new version of the library. Some python code that does something similar is /usr/sbin/checkrestart in the debian-goodies package in Debian.
The UI options that could be shown when stuff needs to be restarted:
Restart system processes (would run /etc/init.d/foo restart).
Restart session and applications (would detect when the gnome/kde session needs restarting and restart gnome-session)
Restart applications (would restart open apps)
For experts there could be a details listing, containing Window names/icons, PIDs, filenames, package names and command-line listings.
It should be able to deal with daemons and apps written in scripting languages like python and perl.
It already detect processes in use, and asks the user to restart the session (logout) -- I guess detecting shared libraries that are being used could be added too. Do you know how to detect this in C?
Not sure about in C, but in shell it would be:
lsof | egrep '(DEL|\(path inode=[0-9]+\)$| \(deleted\)$)'
And then remove files from the resulting list that were not installed by one of the packages on the system. Then ask the user to restart the processes with those files open.
There is a python implementation here:
Unfortunately for stuff written in scripting/vm languages like python/perl/etc you might need to do something else.
Do you also detect when the kernel has been upgraded and a reboot is needed?
We moved the upstream bugtracker to GitHub a long time ago. If this issue still affects you please re-create the issue here: https://github.com/hughsie/PackageKit/issues
Sorry for the impersonal message, and fingers crossed your issue no longer happens. Thanks.