(re)starting of a daemon after package update
pmatilai at laiskiainen.org
Wed Jun 20 15:43:25 UTC 2012
On 06/20/2012 06:42 PM, Panu Matilainen wrote:
> On 06/20/2012 03:37 PM, Reindl Harald wrote:
>> Am 20.06.2012 14:32, schrieb Björn Persson:
>>> Michal Hlavinka wrote:
>>>> Correct approach would be to save state before installation of new
>>>> version starts and start dovecot (if flag is set) after old version is
>>>> removed - that would mean %postun script. This does not seem to work on
>>>> reinstall (the same version is installed) - %postun script is not
>>> Please also consider what happens when the new version of Dovecot
>>> requires a
>>> new version of some library. RPM will ensure that both packages are
>>> updated in
>>> the same transaction, but if I understand correctly it's not until
>>> that you can be sure that the new library is in place.
>> one reason more why the cuurent behavior re-starting services
>> on updates is simply wrong:
> It's also not true.
> If new dovecot requires new version of libfoo, that new libfoo with all
> its files is guaranteed [*] to be installed before the new dovecot,
> ditto for all their dependencies recursively. Reverse for the erasure
> phase, eg the older libfoo version is only removed after everything
> depending on it has been removed. If you think about it a little, not a
> single upgrade involving soname bumps and the like would work properly
> if it wasn't like that.
> Doesn't mean there aren't windows where things can get broken while a
> transaction is in progress, eg you can atomically rename multiple files.
Argh... can NOT atomically rename multiple files.
- Panu -
More information about the devel