tags 392948 patch
thanks

Since the changes in font cache setup, cleaning up the cache after
package removal does not make sense any more.  Therefore, the simplest
way to fix this is to just drop all existing non-debhelper parts from
the postrm scripts.

However, they are also missing something important:  When TeX input or
(in this case) TeX font files are installed and registered with mktexlsr
in the postinst script, they also need to be de-registered upon removal,
by calling mktexlsr again in the postrm script.

Moreover, the call to mktexlsr in the postinst script is buggy:  It
shouldn't use an absolute path.  

The easiest way to fix this is to drop all maintainer scripts completely
and just let debhelper do it, adding dh_installtex to the binary
target.  This adds a versioned tex-common build-dependency.  The only
unfortunate thing is that the version it needs is not yet in testing
(but will go in 5 days).

So here's the patch.  It is untested, since currently the package does
not compile due to a bug in freetype1-tools (#395341).

Regards, Frank

diff -Nur tfm-arphic-2.11.2.old/debian/postinst 
tfm-arphic-2.11.2/debian/postinst
--- tfm-arphic-2.11.2.old/debian/postinst       1999-11-23 20:36:24.000000000 
+0100
+++ tfm-arphic-2.11.2/debian/postinst   1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-#!/bin/sh
-set -e
-
-echo " Running /usr/bin/mktexlsr /usr/share/texmf ..."
-/usr/bin/mktexlsr /usr/share/texmf
-
-#DEBHELPER#
diff -Nur tfm-arphic-2.11.2.old/debian/postrm.in 
tfm-arphic-2.11.2/debian/postrm.in
--- tfm-arphic-2.11.2.old/debian/postrm.in      1999-12-24 17:08:34.000000000 
+0100
+++ tfm-arphic-2.11.2/debian/postrm.in  1970-01-01 01:00:00.000000000 +0100
@@ -1,44 +0,0 @@
-#!/bin/sh
-#
-# postrm script for the Debian GNU/Linux [EMAIL PROTECTED]@[EMAIL PROTECTED]@ 
package
-#   by Anthony Fok <[EMAIL PROTECTED]>
-#   Last modified:  Fri, 24 Dec 1999 09:08:26 -0700
-
-set -e
-
[EMAIL PROTECTED]@[EMAIL PROTECTED]@
-
-# Font settings
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
-
-std_TEXMFMAIN=/usr/share/texmf
-std_VARTEXFONTS=/var/spool/texmf
-
-TEXMFMAIN=`/usr/bin/kpsewhich -expand-var '$TEXMFMAIN'`
-: ${TEXMFMAIN:=$std_TEXMFMAIN}
-
-VARTEXFONTS=`/usr/bin/kpsewhich -expand-var '$VARTEXFONTS'`
-: ${VARTEXFONTS=$std_VARTEXFONTS}
-
-WEB2C=$TEXMFMAIN/web2c
-
-#DEBHELPER#
-
-case "$1" in
-    remove|upgrade)
-    ;;
-
-    purge)
-       rm -rf $VARTEXFONTS/pk/$mode/$supplier/$typeface
-    ;;
-
-    failed-upgrade|abort-install|abort-upgrade|disappear)
-    ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 0
-    ;;
-esac
diff -Nur tfm-arphic-2.11.2.old/debian/rules tfm-arphic-2.11.2/debian/rules
--- tfm-arphic-2.11.2.old/debian/rules  2002-05-31 19:33:38.000000000 +0200
+++ tfm-arphic-2.11.2/debian/rules      2006-10-26 14:50:40.000000000 +0200
@@ -117,13 +117,13 @@
                -e 's/@FAMILYNAME@/$(familyname)/g' \
                -e 's/@TYPEFACE@/$(typeface)/g' \
                copyright.in > $(bin-package).copyright
-       cd debian; \
-           cp postinst $(bin-package).postinst
-       cd debian; \
-           sed -e 's/@MODE@/$(mode)/g' \
-               -e 's/@SUPPLIER@/$(supplier)/g' \
-               -e 's/@TYPEFACE@/$(typeface)/g' \
-               postrm.in > $(bin-package).postrm
+#      cd debian; \
+#          cp postinst $(bin-package).postinst
+#      cd debian; \
+#          sed -e 's/@MODE@/$(mode)/g' \
+#              -e 's/@SUPPLIER@/$(supplier)/g' \
+#              -e 's/@TYPEFACE@/$(typeface)/g' \
+#              postrm.in > $(bin-package).postrm
        dh_clean $(DH_OPTIONS)
        rm -f build-stamp.$(abbrev)
 
@@ -152,6 +152,7 @@
        ln -s ../../../../$(bin-package) $(d)/$(dest_docpath)/$(typeface)
        dh_installchangelogs $(DH_OPTIONS)
        dh_link $(DH_OPTIONS)
+       dh_installtex $(DH_OPTIONS)
        dh_compress $(DH_OPTIONS)
        dh_fixperms $(DH_OPTIONS)
        dh_installdeb $(DH_OPTIONS)
diff -Nur tfm-arphic-2.11.2.old/debian/tfm-arphic-bkai00mp.postinst 
tfm-arphic-2.11.2/debian/tfm-arphic-bkai00mp.postinst
--- tfm-arphic-2.11.2.old/debian/tfm-arphic-bkai00mp.postinst   2003-04-26 
03:43:10.000000000 +0200
+++ tfm-arphic-2.11.2/debian/tfm-arphic-bkai00mp.postinst       1970-01-01 
01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-#!/bin/sh
-set -e
-
-echo " Running /usr/bin/mktexlsr /usr/share/texmf ..."
-/usr/bin/mktexlsr /usr/share/texmf
-
-#DEBHELPER#
diff -Nur tfm-arphic-2.11.2.old/debian/tfm-arphic-bkai00mp.postrm 
tfm-arphic-2.11.2/debian/tfm-arphic-bkai00mp.postrm
--- tfm-arphic-2.11.2.old/debian/tfm-arphic-bkai00mp.postrm     2003-04-26 
03:43:10.000000000 +0200
+++ tfm-arphic-2.11.2/debian/tfm-arphic-bkai00mp.postrm 1970-01-01 
01:00:00.000000000 +0100
@@ -1,44 +0,0 @@
-#!/bin/sh
-#
-# postrm script for the Debian GNU/Linux tfm-arphic-bkai00mp package
-#   by Anthony Fok <[EMAIL PROTECTED]>
-#   Last modified:  Fri, 24 Dec 1999 09:08:26 -0700
-
-set -e
-
-package=tfm-arphic-bkai00mp
-
-# Font settings
-mode=modeless
-supplier=arphic
-typeface=bkai00mp
-
-std_TEXMFMAIN=/usr/share/texmf
-std_VARTEXFONTS=/var/spool/texmf
-
-TEXMFMAIN=`/usr/bin/kpsewhich -expand-var '$TEXMFMAIN'`
-: ${TEXMFMAIN:=$std_TEXMFMAIN}
-
-VARTEXFONTS=`/usr/bin/kpsewhich -expand-var '$VARTEXFONTS'`
-: ${VARTEXFONTS=$std_VARTEXFONTS}
-
-WEB2C=$TEXMFMAIN/web2c
-
-#DEBHELPER#
-
-case "$1" in
-    remove|upgrade)
-    ;;
-
-    purge)
-       rm -rf $VARTEXFONTS/pk/$mode/$supplier/$typeface
-    ;;
-
-    failed-upgrade|abort-install|abort-upgrade|disappear)
-    ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 0
-    ;;
-esac
diff -Nur tfm-arphic-2.11.2.old/debian/tfm-arphic-bsmi00lp.postinst 
tfm-arphic-2.11.2/debian/tfm-arphic-bsmi00lp.postinst
--- tfm-arphic-2.11.2.old/debian/tfm-arphic-bsmi00lp.postinst   2003-04-26 
03:43:10.000000000 +0200
+++ tfm-arphic-2.11.2/debian/tfm-arphic-bsmi00lp.postinst       1970-01-01 
01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-#!/bin/sh
-set -e
-
-echo " Running /usr/bin/mktexlsr /usr/share/texmf ..."
-/usr/bin/mktexlsr /usr/share/texmf
-
-#DEBHELPER#
diff -Nur tfm-arphic-2.11.2.old/debian/tfm-arphic-bsmi00lp.postrm 
tfm-arphic-2.11.2/debian/tfm-arphic-bsmi00lp.postrm
--- tfm-arphic-2.11.2.old/debian/tfm-arphic-bsmi00lp.postrm     2003-04-26 
03:43:10.000000000 +0200
+++ tfm-arphic-2.11.2/debian/tfm-arphic-bsmi00lp.postrm 2006-10-26 
14:14:41.000000000 +0200
@@ -1,44 +0,0 @@
-#!/bin/sh
-#
-# postrm script for the Debian GNU/Linux tfm-arphic-bsmi00lp package
-#   by Anthony Fok <[EMAIL PROTECTED]>
-#   Last modified:  Fri, 24 Dec 1999 09:08:26 -0700
-
-set -e
-
-package=tfm-arphic-bsmi00lp
-
-# Font settings
-mode=modeless
-supplier=arphic
-typeface=bsmi00lp
-
-std_TEXMFMAIN=/usr/share/texmf
-std_VARTEXFONTS=/var/spool/texmf
-
-TEXMFMAIN=`/usr/bin/kpsewhich -expand-var '$TEXMFMAIN'`
-: ${TEXMFMAIN:=$std_TEXMFMAIN}
-
-VARTEXFONTS=`/usr/bin/kpsewhich -expand-var '$VARTEXFONTS'`
-: ${VARTEXFONTS=$std_VARTEXFONTS}
-
-WEB2C=$TEXMFMAIN/web2c
-
-#DEBHELPER#
-
-case "$1" in
-    remove|upgrade)
-    ;;
-
-    purge)
-       rm -rf $VARTEXFONTS/pk/$mode/$supplier/$typeface
-    ;;
-
-    failed-upgrade|abort-install|abort-upgrade|disappear)
-    ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 0
-    ;;
-esac
diff -Nur tfm-arphic-2.11.2.old/debian/tfm-arphic-gbsn00lp.postinst 
tfm-arphic-2.11.2/debian/tfm-arphic-gbsn00lp.postinst
--- tfm-arphic-2.11.2.old/debian/tfm-arphic-gbsn00lp.postinst   2003-04-26 
03:43:11.000000000 +0200
+++ tfm-arphic-2.11.2/debian/tfm-arphic-gbsn00lp.postinst       1970-01-01 
01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-#!/bin/sh
-set -e
-
-echo " Running /usr/bin/mktexlsr /usr/share/texmf ..."
-/usr/bin/mktexlsr /usr/share/texmf
-
-#DEBHELPER#
diff -Nur tfm-arphic-2.11.2.old/debian/tfm-arphic-gbsn00lp.postrm 
tfm-arphic-2.11.2/debian/tfm-arphic-gbsn00lp.postrm
--- tfm-arphic-2.11.2.old/debian/tfm-arphic-gbsn00lp.postrm     2003-04-26 
03:43:11.000000000 +0200
+++ tfm-arphic-2.11.2/debian/tfm-arphic-gbsn00lp.postrm 1970-01-01 
01:00:00.000000000 +0100
@@ -1,44 +0,0 @@
-#!/bin/sh
-#
-# postrm script for the Debian GNU/Linux tfm-arphic-gbsn00lp package
-#   by Anthony Fok <[EMAIL PROTECTED]>
-#   Last modified:  Fri, 24 Dec 1999 09:08:26 -0700
-
-set -e
-
-package=tfm-arphic-gbsn00lp
-
-# Font settings
-mode=modeless
-supplier=arphic
-typeface=gbsn00lp
-
-std_TEXMFMAIN=/usr/share/texmf
-std_VARTEXFONTS=/var/spool/texmf
-
-TEXMFMAIN=`/usr/bin/kpsewhich -expand-var '$TEXMFMAIN'`
-: ${TEXMFMAIN:=$std_TEXMFMAIN}
-
-VARTEXFONTS=`/usr/bin/kpsewhich -expand-var '$VARTEXFONTS'`
-: ${VARTEXFONTS=$std_VARTEXFONTS}
-
-WEB2C=$TEXMFMAIN/web2c
-
-#DEBHELPER#
-
-case "$1" in
-    remove|upgrade)
-    ;;
-
-    purge)
-       rm -rf $VARTEXFONTS/pk/$mode/$supplier/$typeface
-    ;;
-
-    failed-upgrade|abort-install|abort-upgrade|disappear)
-    ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 0
-    ;;
-esac
diff -Nur tfm-arphic-2.11.2.old/debian/tfm-arphic-gkai00mp.postinst 
tfm-arphic-2.11.2/debian/tfm-arphic-gkai00mp.postinst
--- tfm-arphic-2.11.2.old/debian/tfm-arphic-gkai00mp.postinst   2003-04-26 
03:43:11.000000000 +0200
+++ tfm-arphic-2.11.2/debian/tfm-arphic-gkai00mp.postinst       1970-01-01 
01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-#!/bin/sh
-set -e
-
-echo " Running /usr/bin/mktexlsr /usr/share/texmf ..."
-/usr/bin/mktexlsr /usr/share/texmf
-
-#DEBHELPER#
diff -Nur tfm-arphic-2.11.2.old/debian/tfm-arphic-gkai00mp.postrm 
tfm-arphic-2.11.2/debian/tfm-arphic-gkai00mp.postrm
--- tfm-arphic-2.11.2.old/debian/tfm-arphic-gkai00mp.postrm     2003-04-26 
03:43:11.000000000 +0200
+++ tfm-arphic-2.11.2/debian/tfm-arphic-gkai00mp.postrm 1970-01-01 
01:00:00.000000000 +0100
@@ -1,44 +0,0 @@
-#!/bin/sh
-#
-# postrm script for the Debian GNU/Linux tfm-arphic-gkai00mp package
-#   by Anthony Fok <[EMAIL PROTECTED]>
-#   Last modified:  Fri, 24 Dec 1999 09:08:26 -0700
-
-set -e
-
-package=tfm-arphic-gkai00mp
-
-# Font settings
-mode=modeless
-supplier=arphic
-typeface=gkai00mp
-
-std_TEXMFMAIN=/usr/share/texmf
-std_VARTEXFONTS=/var/spool/texmf
-
-TEXMFMAIN=`/usr/bin/kpsewhich -expand-var '$TEXMFMAIN'`
-: ${TEXMFMAIN:=$std_TEXMFMAIN}
-
-VARTEXFONTS=`/usr/bin/kpsewhich -expand-var '$VARTEXFONTS'`
-: ${VARTEXFONTS=$std_VARTEXFONTS}
-
-WEB2C=$TEXMFMAIN/web2c
-
-#DEBHELPER#
-
-case "$1" in
-    remove|upgrade)
-    ;;
-
-    purge)
-       rm -rf $VARTEXFONTS/pk/$mode/$supplier/$typeface
-    ;;
-
-    failed-upgrade|abort-install|abort-upgrade|disappear)
-    ;;
-
-    *)
-        echo "postrm called with unknown argument \`$1'" >&2
-        exit 0
-    ;;
-esac

-- 
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)

Reply via email to