Package: developers-reference Version: 3.4.16 Severity: wishlist As discussed on debian-devel starting at [1], I would like a comment added to Section 6.4 "Best practices for maintainer scripts" that recommends preventing the postinst script from returning failure when a service fails to start.
A general rule of thumb is that if the corrective action would not otherwise require re-running dpkg, then the postinst should behave as if the installation succeeded. An example of a case where postinst should succeed is if the admin, prior to an upgrade, modified a configuration file which resulted in the service being unable to restart during the upgrade. Another example is if the service requires another resource to be available that might be on another machine (e.g. a database). The rational is that the failure has nothing to do with the installation process or the contents of the .deb. The service might just as well have failed on reboot even though it was correctly installed. I will send a follow-up message that contains a condensed digest of the thread beginning at [1]. ...Marvin [1] https://lists.debian.org/debian-devel/2015/09/msg00496.html