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.
one reason more why the cuurent behavior re-starting services
on updates is simply wrong:
* it breaks running services on dist-upgrades
* it breaks coordinated updates/restarts of admins action with
10,20,30 instances of fedora at the same time
* it breaks security if a depending library is updated
after the service in the transaction whileyou imply
for users that they do no longer need to use their own
brain - t is generallya bad direction giving the user
a sign that is own brain is longter useful
* it forces coordinated working admin to re-build every
server package and pacth out the restart-part from SPEC