Bug#681546: apache2-dev: consider having dh_apache2 dismod in prerm, not postrm
If a package Breaks another package and the breaking package is installed,
the package that is broken will not necessarily be removed. It may only
be deconfigured. Part of the definition of Breaks (as opposed to Conflicts)
is that the packages may co-exist in unconfigured states because there isn't
an actual file conflict preventing simultaneous unpacking.
However, currently dh_apache2 only disables a module in postrm on remove or
purge. If an Apache module package is deconfigured because another package
declares a Breaks on that package, the module may therefore be left both
installed and active in the Apache configuration.
Given that the most likely use of Breaks would be to indicate that something
about the package causes the Apache module that is broken to stop working,
become unsafe, or otherwise not possible to use simultaneously, I think it
would make more sense to deconfigure the module in this case by removing it
from the Apache configuration.
I believe, from a brief look at what the Apache maintainer script helper
does, that this could be implemented by moving the default dismod action
from postrm to prerm and ensuring that it runs for all prerm actions
*except* upgrade and failed-upgrade (since I don't think you want to
unconfigure the module and reconfigure the module on every module package
upgrade). The current prerm actions other than upgrade and failed-upgrade
are remove and deconfigure; I'm not sure whether it would be safer to run
this action only on remove or deconfigure, or to run it on any action other
than upgrade and failed-upgrade.
-- 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 debhelper 9.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