Bug#681545: apache2-dev: dh_apache2 postinst action should run during more actions
tags 681545 pending thanks Hi, along with the fix for #681546 I also changed the behavior for postinst. It's called unconditionally now in postinst, as we disable the module in prerm now, so that we need to cover the rollback case again. -- with kind regards, Arno Töll IRC: daemonkeeper on Freenode/OFTC GnuPG Key-ID: 0x9D80F36D signature.asc Description: OpenPGP digital signature
Bug#681545: apache2-dev: dh_apache2 postinst action should run during more actions
Arno Töll a...@debian.org writes: I'm finally coming back to the dh_apache issues you filed long ago. I believe you should therefore just remove this conditional and run this code in postinst unconditionally. Your explanation sounds right to me. However, we do not unconditionally disable the module either. We only do so in case of postrm purge|remove to ensure the web server is not reloaded without need. This makes the abort-upgrade|abort-remove|abort-deconfigure operations a no op with respect to Apache maintainer scripts. Ah, yes, I see. You only remove the module during postrm, so this would only affect people who wrote explicit maintainer scripts to do something to the module during prerm. (I think there was a comment in apache2-maintscript-helper to that effect.) Given that, I agree, there's no need to run on any action other than configure unless you want to cater to people who are fiddling about in prerm, and I don't see any reallly obvious reason why you should need to do that. -- Russ Allbery (r...@debian.org) http://www.eyrie.org/~eagle/ -- To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87txogjckk@windlord.stanford.edu
Bug#681545: apache2-dev: dh_apache2 postinst action should run during more actions
Hi Russ, I'm finally coming back to the dh_apache issues you filed long ago. I believe you should therefore just remove this conditional and run this code in postinst unconditionally. Your explanation sounds right to me. However, we do not unconditionally disable the module either. We only do so in case of postrm purge|remove to ensure the web server is not reloaded without need. This makes the abort-upgrade|abort-remove|abort-deconfigure operations a no op with respect to Apache maintainer scripts. Our goal should be to minimize the impact of an upgrade. Many people tend to be annoyed when the web server is restarted during upgrades. Hence, I do believe configure is correct, but I might try some of the abort/failure cases you mentioned before deciding what to do eventually with your bug. Does my explanation make sense to you? -- with kind regards, Arno Töll IRC: daemonkeeper on Freenode/OFTC GnuPG Key-ID: 0x9D80F36D signature.asc Description: OpenPGP digital signature
Bug#681545: apache2-dev: dh_apache2 postinst action should run during more actions
Package: apache2-dev Version: 2.4.2-2 Severity: normal The default postinst code generated by dh_apache2 is: if [ $1 = configure ] true; then if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then . /usr/share/apache2/apache2-maintscript-helper for conf in webkdc ; do apache2_invoke enmod $conf || exit 0 done fi fi and therefore doesn't run unless the postinst action is configure. This is a common error in maintainer scripts; it is incorrect in various error situations. In general, the dpkg maintainer script design tries to allow actions to be run unconditionally. Without a condition, the error fallbacks usually work properly. In addition to configure, postinst can also be invovked in the following ways: - abort-upgrade: prerm upgrade fails or preinst upgrade fails. Probably not significant for most modules, but calling enmod in those cases is certainly not wrong and at worst results in an unnecessary Apache reload. - abort-remove: prerm remove failed. The module may have dismod'd by the remove action (if the package maintainer chose to do this in prerm instead of postrm) and then a later remove action failed, which means that we need to enmod the module again in order to correctly recover. - abort-deconfigure: prerm deconfigure failed. This is what's used for a Breaks state, so similarly the module may have been dismod'd by the deconfigure action and enmod is required to properly roll back. I believe you should therefore just remove this conditional and run this code in postinst unconditionally. -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 3.2.0-2-686-pae (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages apache2-dev depends on: ii apache2 2.4.2-2 ii debhelper9.20120608 ii libapr1-dev 1.4.6-3 ii libaprutil1-dev 1.4.1-2 ii openssl 1.0.1c-3 ii perl 5.14.2-12 apache2-dev recommends no packages. apache2-dev suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20120714032257.19017.54974.report...@windlord.stanford.edu