]> eyrie.org Git - kerberos/kftgt.git/commitdiff
Remove klogin.1.gz before undoing the diversion to handle a corner case debian/1.9-1
authorRuss Allbery <rra@stanford.edu>
Wed, 24 Aug 2005 20:39:16 +0000 (20:39 +0000)
committerRuss Allbery <rra@stanford.edu>
Mon, 15 Mar 2010 06:05:55 +0000 (23:05 -0700)
involving upgrading, downgrading, and then upgrading again.

debian/kftgt.preinst

index 896b4466624f79dbb9ab226be55f56cd7b3d9a0c..ba52aaf0be37ad3faadb90c87787d79ba4fe37ec 100644 (file)
@@ -1,9 +1,18 @@
 #!/bin/sh
 # Clean up diversions from previous versions of the package.
+#
+# Any existing klogin.1.gz man page is removed here since otherwise if the
+# package was upgraded to a version without the diversion, downgraded to a
+# version with the diversion, and then upgraded again, the man page exists
+# under both names and dpkg-divert refuses to overwrite klogin.1.gz.  Since
+# we're installing a package that's about to provide klogin.1.gz and
+# conflict with everything else in Debian that provides a file of that name,
+# this appears to be the expedient fix.
 
 set -e
 
 if [ upgrade = "$1" ] && dpkg --compare-versions "$2" lt 1.8-2 ; then
+    rm -f /usr/share/man/man1/klogin.1.gz
     dpkg-divert --package kftgt --remove --rename \
         --divert /usr/share/man/man1/klogin-krb4kth-clients.1.gz \
         /usr/share/man/man1/klogin.1.gz