(re)starting of a daemon after package update

Michal Hlavinka mhlavink at redhat.com
Thu Jun 21 20:52:36 UTC 2012


On 06/20/2012 02: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 executed.
>>
>> 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 %posttrans
>> that you can be sure that the new library is in place.

%postun is sufficient, but it's not executed on package reinstall

>
> one reason more why the cuurent behavior re-starting services
> on updates is simply wrong:

You complained that service is restarted during update. Well, in this 
case, restart is not sufficient. We even have to be sure, the service is 
not running when there are both old and new files in place. Not 
restarting the service would be "simply wrong"


More information about the devel mailing list