[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Pkg-fonts-devel] Bug#700724: pu: package ttf-ipafont/00203-16+squeeze1



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: pu

Hi,

ttf-ipafont does not correctly handle the alternatives:
* ttf-ipafont-{gothic,mincho}.postinst registers them
* ttf-ipafont.prerm unregisters them
(that it probably an oversight when the package was split)

This leads to the following errors if ttf-ipafont is installed, removed
and installed again:

0m16.5s ERROR: FAIL: After purging files have disappeared:
  /etc/alternatives/ttf-japanese-gothic.ttf -> /usr/share/fonts/truetype/ipafont/ipag.ttf	 not owned
  /etc/alternatives/ttf-japanese-mincho.ttf -> /usr/share/fonts/truetype/ipafont/ipam.ttf	 not owned
  /usr/share/fonts/truetype/ttf-japanese-gothic.ttf -> /etc/alternatives/ttf-japanese-gothic.ttf	 not owned
  /usr/share/fonts/truetype/ttf-japanese-mincho.ttf -> /etc/alternatives/ttf-japanese-mincho.ttf	 not owned

And I actually had forgotten to file a bug about this until a few minutes
ago :-)

The attached patch fixes this by moving the unregistration to the
respective prerm while keeping all the ancient cleanup code in the
ttf-ipafont package.

Andreas
diffstat for ttf-ipafont-00203 ttf-ipafont-00203

 changelog                |    9 +++++++++
 ttf-ipafont-gothic.prerm |   11 +++++++++++
 ttf-ipafont-mincho.prerm |   11 +++++++++++
 ttf-ipafont.prerm        |    3 ---
 4 files changed, 31 insertions(+), 3 deletions(-)

diff -Nru ttf-ipafont-00203/debian/changelog ttf-ipafont-00203/debian/changelog
--- ttf-ipafont-00203/debian/changelog	2010-07-21 17:47:51.000000000 +0200
+++ ttf-ipafont-00203/debian/changelog	2013-02-16 17:54:41.000000000 +0100
@@ -1,3 +1,12 @@
+ttf-ipafont (00203-16+squeeze1) stable; urgency=low
+
+  * Non-maintainer upload.
+  * ttf-ipafont.prerm: Move removal of the current alternatives to
+    ttf-ipafont-{gothic,mincho}.prerm as their postinst creates them.
+    (Closes: 700722)
+
+ -- Andreas Beckmann <anbe@debian.org>  Sat, 16 Feb 2013 17:54:34 +0100
+
 ttf-ipafont (00203-16) unstable; urgency=low
 
   * debian/control
diff -Nru ttf-ipafont-00203/debian/ttf-ipafont-gothic.prerm ttf-ipafont-00203/debian/ttf-ipafont-gothic.prerm
--- ttf-ipafont-00203/debian/ttf-ipafont-gothic.prerm	1970-01-01 01:00:00.000000000 +0100
+++ ttf-ipafont-00203/debian/ttf-ipafont-gothic.prerm	2013-02-16 17:24:12.000000000 +0100
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+
+ALT_GOTHIC_NAME="ttf-japanese-gothic"
+GOTHIC_FONT_ENTRY="/usr/share/fonts/truetype/ipafont/ipag.ttf"
+
+if [ "$1" = "remove" ]; then
+        update-alternatives --remove $ALT_GOTHIC_NAME.ttf $GOTHIC_FONT_ENTRY
+fi
+
+#DEBHELPER#
diff -Nru ttf-ipafont-00203/debian/ttf-ipafont-mincho.prerm ttf-ipafont-00203/debian/ttf-ipafont-mincho.prerm
--- ttf-ipafont-00203/debian/ttf-ipafont-mincho.prerm	1970-01-01 01:00:00.000000000 +0100
+++ ttf-ipafont-00203/debian/ttf-ipafont-mincho.prerm	2013-02-16 17:24:20.000000000 +0100
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+
+ALT_MINCHO_NAME="ttf-japanese-mincho"
+MINCHO_FONT_ENTRY="/usr/share/fonts/truetype/ipafont/ipam.ttf"
+
+if [ "$1" = "remove" ]; then
+        update-alternatives --remove $ALT_MINCHO_NAME.ttf $MINCHO_FONT_ENTRY
+fi
+
+#DEBHELPER#
diff -Nru ttf-ipafont-00203/debian/ttf-ipafont.prerm ttf-ipafont-00203/debian/ttf-ipafont.prerm
--- ttf-ipafont-00203/debian/ttf-ipafont.prerm	2009-12-12 08:43:44.000000000 +0100
+++ ttf-ipafont-00203/debian/ttf-ipafont.prerm	2013-02-16 17:24:40.000000000 +0100
@@ -39,9 +39,6 @@
           rm /usr/share/fonts/truetype/$ALT_MINCHO_NAME
         fi
 
-        update-alternatives --remove $ALT_GOTHIC_NAME.ttf $GOTHIC_FONT_ENTRY
-        update-alternatives --remove $ALT_MINCHO_NAME.ttf $MINCHO_FONT_ENTRY
-
         ;;
 
     failed-upgrade)

Reply to: