[Debian-tex-commits] SVN tex-common commit + diffs: r4242 - tex-common/branches/for-tl2008/scripts

Norbert Preining preining at alioth.debian.org
Sun Oct 4 11:19:58 UTC 2009


Author: preining
Date: 2009-10-04 11:19:58 +0000 (Sun, 04 Oct 2009)
New Revision: 4242

Modified:
   tex-common/branches/for-tl2008/scripts/postinst-tex
   tex-common/branches/for-tl2008/scripts/postrm-tex
Log:
add update-* calls to postinst-tex, it was lost when I eliminated 
postinst-texlsr, where those were called in any case


Modified: tex-common/branches/for-tl2008/scripts/postinst-tex
===================================================================
--- tex-common/branches/for-tl2008/scripts/postinst-tex	2009-10-04 11:08:32 UTC (rev 4241)
+++ tex-common/branches/for-tl2008/scripts/postinst-tex	2009-10-04 11:19:58 UTC (rev 4242)
@@ -86,9 +86,17 @@
 
 case "$1" in
     configure|abort-upgrade|abort-remove|abort-deconfigure)
+        # These programs are all in tex-common and can be run immediately.
+        # In fact it *does* hurt not calling them since we might
+        # have formats installed and we call with --all, so not the
+        # trigger action is done, but the postinst runs the fmtutil-sys call
+        update-updmap --quiet
+        update-language
+        update-fmtutil
         # All of the following needs an installed and configured
         # basic TeX system, so check this.
         if dhit_libkpathsea_configured; then
+            #
             # if we are doing something with formats we have to update
             # the lsr database first
             do_lsr=0

Modified: tex-common/branches/for-tl2008/scripts/postrm-tex
===================================================================
--- tex-common/branches/for-tl2008/scripts/postrm-tex	2009-10-04 11:08:32 UTC (rev 4241)
+++ tex-common/branches/for-tl2008/scripts/postrm-tex	2009-10-04 11:19:58 UTC (rev 4242)
@@ -26,9 +26,44 @@
     fi
 }
 
+dhit_check_run_without_errors ()
+{
+    silent=0
+    if [ "$1" = "-silent" ] ; then
+        silent=1
+        shift
+    fi
+    if which "$1" >/dev/null; then
+        tempfile=$(mktemp -p /tmp checkrun.XXXXXXXX)
+        if [ $silent = 0 ] ; then
+            printf "Running '$*'.\nThis may take some time..."
+        fi
+        set +e
+        if "$@" > $tempfile 2>&1 ; then
+            rm -f $tempfile
+            [ $silent = 0 ] && echo " done."
+        else
+            echo
+            echo "$* failed. Output has been stored in"
+            echo "$tempfile"
+            echo "If tex-common is not configured you can ignore this error" \
+                 "message!"
+            echo "Otherwise, please include this file if you report a bug."
+            echo
+        fi
+        set -e
+    fi
 
+    return 0
+}
+
+
 case "$1" in
     remove|disappear)
+        # It doesn't hurt to call all of them.
+        dhit_check_run_without_errors -silent update-updmap --quiet
+        dhit_check_run_without_errors -silent update-language
+        dhit_check_run_without_errors -silent update-fmtutil
         for i in #WHATTODO# ; do
             if [ "$i" = lsr ] ; then
                 dhit_call_update_texmf_config lsr




More information about the Debian-tex-commits mailing list