Re: (re)starting of a daemon after package update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 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'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.

[*] Guaranteed except in presence of dependency loops, in which case rpm tries to break up the loop(s) in the least disruptive way, but there can be no guarantees in such situations.

	- Panu -


--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux