Followup-For: Bug #692954 Hi,
attached is a patch fixing two issues: * cleanup forgotten misspelled diversion * do not remove+reinstall alternatives on upgrades as that may override local customization I'll upload this as a NMU to DELAYED/2 and try to get this fix into jessie. Please let me know if I should delay it longer. Andreas
diff -u courier-0.73.1/debian/changelog courier-0.73.1/debian/changelog --- courier-0.73.1/debian/changelog +++ courier-0.73.1/debian/changelog @@ -1,3 +1,13 @@ +courier (0.73.1-1.6) unstable; urgency=medium + + * Non-maintainer upload. + * courier-mta.preinst: Clean up a misspelled diversion dating back to lenny. + (Closes: #692954) + * courier-base.prerm, courier-mta.prerm: Do not remove (and reinstall) + alternatives on upgrades, as that may remove local customization. + + -- Andreas Beckmann <a...@debian.org> Sat, 24 Jan 2015 15:24:36 +0100 + courier (0.73.1-1.5) unstable; urgency=medium * Non-maintainer upload. diff -u courier-0.73.1/debian/courier-base.prerm courier-0.73.1/debian/courier-base.prerm --- courier-0.73.1/debian/courier-base.prerm +++ courier-0.73.1/debian/courier-base.prerm @@ -17,7 +17,7 @@ # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA. -if [ "$1" = "upgrade" -o "$1" = "remove" ]; then +if [ "$1" = "remove" ]; then for binary in maildirmake deliverquota makedat; do update-alternatives --remove $binary /usr/bin/$binary.courier done diff -u courier-0.73.1/debian/courier-mta.preinst courier-0.73.1/debian/courier-mta.preinst --- courier-0.73.1/debian/courier-mta.preinst +++ courier-0.73.1/debian/courier-mta.preinst @@ -25,6 +25,15 @@ --divert /usr/share/man/man1/addcr.ucspi-tcp.1.gz /usr/share/man/man1/addcr.1.gz } +if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then + # remove misspelled diversion dating back to lenny + # do not use --rename to avoid clashing with the correctly spelled diversion + if [ -n "$(dpkg-divert --listpackage /usr/share/man/man1/addcr.1.g)" ]; then + dpkg-divert --package courier-mta --remove \ + --divert /usr/share/man/man1/addcr.ucspi-tcp.1.gz /usr/share/man/man1/addcr.1.g + fi +fi + if [ "$1" = "install" ]; then add_diversion fi diff -u courier-0.73.1/debian/courier-mta.prerm courier-0.73.1/debian/courier-mta.prerm --- courier-0.73.1/debian/courier-mta.prerm +++ courier-0.73.1/debian/courier-mta.prerm @@ -17,7 +17,7 @@ # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA. -if [ "$1" = "upgrade" -o "$1" = "remove" ]; then +if [ "$1" = "remove" ]; then for binary in lockmail preline; do update-alternatives --remove $binary /usr/bin/$binary.courier done