However using --restart-after-upgrade option should be feasible:
-R, --restart-after-upgrade
Do not stop the init script until after the package upgrade has been completed. This is different than the default behavior, which stops the script in the prerm, and starts it again in the postinst.
This can be useful for daemons that should not have a possibly long downtime during upgrade. But you should make sure that the daemon will not get confused by the package being upgraded
while it's running before using this option.
That way:
prerm libvirt-bin -> old libvirt continious to run
....
postinst libvirt-bin -> stop; start libvirt-bin (restarted into new libvirt)
You can however minimise the downtime:
Currently this happens:
prerm libvirt-bin -> stop libvirt
...
upgrade hundreds of packages
...
postinst libvirt-bin -> start libvirt
However using --restart- after-upgrade option should be feasible: after-upgrade
postinst.
-R, --restart-
Do not stop the init script until after the package upgrade has been completed. This is different than the default behavior, which stops the script in the prerm, and starts it again in the
This can be useful for daemons that should not have a possibly long downtime during upgrade. But you should make sure that the daemon will not get confused by the package being upgraded
while it's running before using this option.
That way:
prerm libvirt-bin -> old libvirt continious to run
....
postinst libvirt-bin -> stop; start libvirt-bin (restarted into new libvirt)