[Pkg-fonts-devel] Bug#700341: fonts-ipafont: does not remove ttf-japanese-*.ttf alternatives on upgrades from squeeze
Followup-For: Bug #700341
Attaching the patch.
Versioning is for a NMU, for a maintainer upload s/-10.1/-11/ globally.
Verified several upgrade scenarios with piuparts.
Andreas
diffstat for fonts-ipafont-00303 fonts-ipafont-00303
changelog | 13 +++++++++++++
fonts-ipafont-gothic.preinst | 8 ++++++++
fonts-ipafont-mincho.preinst | 7 +++++++
otf-ipafont-gothic.preinst | 13 +++++++++++++
otf-ipafont-mincho.preinst | 13 +++++++++++++
5 files changed, 54 insertions(+)
diff -Nru fonts-ipafont-00303/debian/changelog fonts-ipafont-00303/debian/changelog
--- fonts-ipafont-00303/debian/changelog 2012-06-15 22:34:43.000000000 +0200
+++ fonts-ipafont-00303/debian/changelog 2013-02-11 22:24:32.000000000 +0100
@@ -1,3 +1,16 @@
+fonts-ipafont (00303-10.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * otf-ipafont-*.preinst: Unregister the ttf-japanese-*.ttf alternatives.
+ * fonts-ipafont-*.preinst: Clean up the ttf-japanese-*.ttf alternatives set
+ up by otf-ipafont-* in squeeze. This needs to be done in fonts-ipafont-*
+ as well since there is no guarantee that the transitional otf-ipafont-*
+ packages were installed and did clean this up. Since new installations of
+ fonts-ipafont-* cannot be distinguished from "upgrades" from otf-ipafont-*
+ this needs to be run on new installations, too. (Closes: #700341)
+
+ -- Andreas Beckmann <anbe@debian.org> Mon, 11 Feb 2013 22:24:23 +0100
+
fonts-ipafont (00303-10) unstable; urgency=low
* debian/lintian*, debian/fonts-ipafont*.install
diff -Nru fonts-ipafont-00303/debian/fonts-ipafont-gothic.preinst fonts-ipafont-00303/debian/fonts-ipafont-gothic.preinst
--- fonts-ipafont-00303/debian/fonts-ipafont-gothic.preinst 2011-09-19 05:26:30.000000000 +0200
+++ fonts-ipafont-00303/debian/fonts-ipafont-gothic.preinst 2013-02-11 18:15:34.000000000 +0100
@@ -10,6 +10,8 @@
CHECK_VERSION=00303-5
OLD_ALT_NAME=ttf-japanese-gothic
FONT_ENTRY=$OTF_FONT_ENTRY
+OLD_FONT_ENTRY=/usr/share/fonts/opentype/ipafont/ipag.ttf
+
case "$1" in
install|upgrade)
@@ -26,6 +28,12 @@
fi
fi
+ # do this on new installations, too, as these could be "upgrades"
+ # from otf-ipafont-gothic
+ if dpkg --compare-versions "$2" lt "00303-10.1~" ; then
+ update-alternatives --remove $OLD_ALT_NAME.ttf $OLD_FONT_ENTRY
+ fi
+
esac
#DEBHELPER#
diff -Nru fonts-ipafont-00303/debian/fonts-ipafont-mincho.preinst fonts-ipafont-00303/debian/fonts-ipafont-mincho.preinst
--- fonts-ipafont-00303/debian/fonts-ipafont-mincho.preinst 2011-09-19 05:26:30.000000000 +0200
+++ fonts-ipafont-00303/debian/fonts-ipafont-mincho.preinst 2013-02-11 18:15:43.000000000 +0100
@@ -10,6 +10,7 @@
CHECK_VERSION=00303-5
OLD_ALT_NAME=ttf-japanese-mincho
FONT_ENTRY=$OTF_FONT_ENTRY
+OLD_FONT_ENTRY=/usr/share/fonts/opentype/ipafont/ipam.ttf
case "$1" in
@@ -27,6 +28,12 @@
fi
fi
+ # do this on new installations, too, as these could be "upgrades"
+ # from otf-ipafont-mincho
+ if dpkg --compare-versions "$2" lt "00303-10.1~" ; then
+ update-alternatives --remove $OLD_ALT_NAME.ttf $OLD_FONT_ENTRY
+ fi
+
esac
#DEBHELPER#
diff -Nru fonts-ipafont-00303/debian/otf-ipafont-gothic.preinst fonts-ipafont-00303/debian/otf-ipafont-gothic.preinst
--- fonts-ipafont-00303/debian/otf-ipafont-gothic.preinst 1970-01-01 01:00:00.000000000 +0100
+++ fonts-ipafont-00303/debian/otf-ipafont-gothic.preinst 2013-02-11 16:03:23.000000000 +0100
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+
+OLD_ALT_NAME="ttf-japanese-gothic"
+OLD_FONT_ENTRY="/usr/share/fonts/opentype/ipafont/ipag.ttf"
+
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
+ if dpkg --compare-versions "$2" lt-nl "00303-10.1~"; then
+ update-alternatives --remove $OLD_ALT_NAME.ttf $OLD_FONT_ENTRY
+ fi
+fi
+
+#DEBHELPER#
diff -Nru fonts-ipafont-00303/debian/otf-ipafont-mincho.preinst fonts-ipafont-00303/debian/otf-ipafont-mincho.preinst
--- fonts-ipafont-00303/debian/otf-ipafont-mincho.preinst 1970-01-01 01:00:00.000000000 +0100
+++ fonts-ipafont-00303/debian/otf-ipafont-mincho.preinst 2013-02-11 16:42:53.000000000 +0100
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+
+OLD_ALT_NAME="ttf-japanese-mincho"
+OLD_FONT_ENTRY="/usr/share/fonts/opentype/ipafont/ipam.ttf"
+
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
+ if dpkg --compare-versions "$2" lt-nl "00303-10.1~"; then
+ update-alternatives --remove $OLD_ALT_NAME.ttf $OLD_FONT_ENTRY
+ fi
+fi
+
+#DEBHELPER#
Reply to: