Hi!

Am Dienstag, den 15.03.2011, 11:26 +0100 schrieb Patrick Ohly: 
> Second problem: syncevo-dbus-server might be running while packages are
> updated, which leads to the situation that it uses an old libsynthesis
> in memory.
> 
> I'm not entirely sure how to solve that second problem. I could try
> dynamic loading of libsynthesis, but that only covers the libsynthesis
> dependency and not the update of SyncEvolution itself, nor of any of the
> other shared libraries in use by the process. If anyone has suggestions
> for how user-space restarts are meant to be handled by distros, then
> please let me know.

I’m surely no expert on this matter, but I know that Ubuntu has somewhat
a mechanism for this, since firefox upgrades notify the user to restart
firefox.

The postinst script for firefox contains this snippet:

if [ -d $UPDATENOTIFIERDIR ] ; then
  # pgrep matches application names from /proc/<pid>/status which is
  # truncated according to sys/procfs.h definition. Problem is it's
  # platform dependent. Either 15 or 16 chars.
  if [ `/usr/bin/pgrep -x -c firefox` -ne 0 ] ||
     [ `/usr/bin/pgrep -x -c $APPNAME` -ne 0 ] ;  then
    cp -f $LIBDIR/$APPNAME-restart-required.update-notifier \
        $UPDATENOTIFIERDIR/$APPNAME-restart-required
  else
    rm -f $UPDATENOTIFIERDIR/$APPNAME-restart-required
  fi
fi

/usr/lib/firefox-3.6.15/firefox-restart-required.update-notifier
contains:

Name: Firefox restart required
Name-fr: Relancement de Firefox 3.6 requis
Priority: High
Terminal: False
DontShowAfterReboot: True
DisplayIf: pgrep -x firefox -U $(id -u) > /dev/null
Description: Firefox has been upgraded (or reinstalled) and must be
restarted.
Please quit and restart your web browser now.
Description-fr: Firefox a été mis à jour (ou réinstallé) et doit être
relancé.
Veuillez quitter et redémarrer for navigateur.


The downside of this is that it requires manual user intervention, but I
don’t know if there is an easy way for end-users to restart
snyncevo-dbus-server. An alternative could be to use the generic
“restart required” mechanism in update-notifier (didn’t investigate the
details further, but should be manageable to find out).
syncevo-dbus-server would still have to handle issues caused by
mismatching versions, but it could simply cancel operations when it
detects such a situation, since the user knows that he or she cannot
expect things to work properly until the system is restarted.

Just what came to my mind spontaneously, there might be better
solutions.

Regards,
Frederik

_______________________________________________
SyncEvolution mailing list
SyncEvolution@syncevolution.org
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to