The packages concerned are:
* xfce4-mcs-plugins
* libexo-0.3-0
* orage
* xfce4-mixer
* xfce4-panel
* xfce4-session
* xfce4-utils
* xfdesktop4
* xfprint4
* xfwm4
Currently, we do a kill -USR1 `pidof xfce-mcs-manager` in the postinst script of these packages. Problem is that when you install, remove, or upgrade complete Xfce, xfce-mcs-manager is refreshed a lot of times.
Immediate effect is that you lose the gtk theme for few seconds at each time. Indeed, current implementation of xfce-mcs-manager says that when it receive a SIGUSR1, it unload every plugin, then stop xfce-mcs-manager, then start it again:
if (sigstate == RESTART)
{
/* unload all plugins and destroy the manager */
unload_plugins ();
mcs_manager_destroy (manager);
/* just run the MCS manager from scratch */
execvp (rargv[0], rargv);
_exit (EXIT_SUCCESS);
}
{
/* unload all plugins and destroy the manager */
unload_plugins ();
mcs_manager_destroy (manager);
/* just run the MCS manager from scratch */
execvp (rargv[0], rargv);
_exit (EXIT_SUCCESS);
}
It takes some time, especially during and upgrade, where the CPU, MEM and HD are used quite extensively. And I guess there are race conditions if multiple signals are sent before xfce-mcs-manager has finished restarting.
Previous implementation was only to unload/reload plugins, but it crashed randomly (and systematically on ppc), so Benny changed the code.
Now the code works, but it's quite long and crash from time to time. But besides everything, we shouldn't refresh it at each upgrade. If there is only one, it's ok to refresh it at postinst, but not when there are ten upgrades.
It'd be nice to be able to postpone refresh at the last postinst. Or maybe do nothing but ask for user to restart Xfce when the upgrade is finished.
I don't really see a way to detect that an upgrade is the last one, but if anybody has a clue, please tell me...