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

[Pkg-fonts-devel] Bug#700722: ttf-ipafont: removing ttf-ipafont unregisters alternatives created by ttf-ipafont-{gothic, mincho}



Package: ttf-ipafont
Version: 00203-16
Severity: important
Tags: patch
User: debian-qa@lists.debian.org
Usertags: piuparts

Hi,

during a test with piuparts I noticed your package mishandles the
alternatives it creates: ttf-ipafont-{gothic,mincho}.postinst register
the current alternatives, but ttf-ipafont.prerm unregisters them. That
is probably an oversight from splitting the package.

>From the attached log (scroll to the bottom...):

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

I'm attaching a patch to fix this and will ask for fixing this via
s-p-u. In that case I'd NMU ttf-ipafont with a DELAYED/1 upload to get
into p-u-NEW before Monday to have it included in the next point
release.

If you have any objections, please let me know.

All install and upgrade paths affecting lenny/squeeze have been
successfully tested with piuparts, incuding the previously failing
--install-purge-install test.

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

 changelog                |    8 ++++++++
 ttf-ipafont-gothic.prerm |   11 +++++++++++
 ttf-ipafont-mincho.prerm |   11 +++++++++++
 ttf-ipafont.prerm        |    3 ---
 4 files changed, 30 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:27:53.000000000 +0100
@@ -1,3 +1,11 @@
+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.
+
+ -- Andreas Beckmann <anbe@debian.org>  Sat, 16 Feb 2013 17:27:53 +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)

Attachment: ttf-ipafont_00203-16.log.gz
Description: GNU Zip compressed data


Reply to: