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

fmtutil vs. fmtutil-sys



merge 338327 340075
tag 338327 patch
quit

Hi all!

I would suggest that xmltex takes a similar approach to the
fmtutil/fmtutil-sys stuff as taken in the jadetex package, this is:
Define a variable fmtutil=fmtutil, if fmtutil-sys is present, redefine
fmtutil=fmtutil-sys, and later call $fmtutil.

Atached is a patch which fixes the postinst scripts. It installs fine on
current tetex.

Furthermore, if I tweak the control file, it also installs fine on the
texlive packages. (Will become a separate bug report).


Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining AT logic DOT at>             Università di Siena
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
SCRAMOGE (vb.)
To cut oneself whilst licking envelopes.
			--- Douglas Adams, The Meaning of Liff
--- postinst	2005-12-13 08:43:12.000000000 +0100
+++ xmltex.postinst.fixed	2005-12-12 22:20:49.000000000 +0100
@@ -7,6 +7,9 @@
 
 set -e
 
+fmtutil=fmtutil
+if [ -x /usr/bin/fmtutil-sys ]; then fmtutil=fmtutil-sys; fi
+
 # summary of how this script can be called:
 #        * <postinst> `configure' <most-recently-configured-version>
 #        * <old-postinst> `abort-upgrade' <new version>
@@ -68,8 +71,8 @@
     baseformat=$(basename $1 .efmt)
     if ! kpsewhich $format > /dev/null ; then
         warn "WARNING: $format not found, attempting to reconstruct ..."
-        echo "running 'fmtutil --byfmt $baseformat'" >> $MYTMP
-        fmtutil --byfmt $baseformat >> $MYTMP
+        echo "running '$fmtutil --byfmt $baseformat'" >> $MYTMP
+        $fmtutil --byfmt $baseformat >> $MYTMP
         if kpsewhich $format > /dev/null ; then
             warn "Success"
         else
@@ -84,14 +87,14 @@
     local goterror
     goterror=false
 
-    if ! fmtutil --byfmt xmltex >> $MYTMP
+    if ! $fmtutil --byfmt xmltex >> $MYTMP
     then
-        warn "ERROR: xmltex fmtutil failed" 1>&2
+        warn "ERROR: xmltex $fmtutil failed" 1>&2
         goterror=true
     fi
-    if ! fmtutil --byfmt pdfxmltex >> $MYTMP
+    if ! $fmtutil --byfmt pdfxmltex >> $MYTMP
     then
-        warn "ERROR: pdfxmltex fmtutil failed" 1>&2
+        warn "ERROR: pdfxmltex $fmtutil failed" 1>&2
         goterror=true
     fi
     if $goterror; then
@@ -157,8 +160,8 @@
 	    rm $MYTMP
             echo "Done."
         else
-	    echo "Trying fmtutil --all"
-	    if fmtutil --all >>$MYTMP; then
+	    echo "Trying $fmtutil --all"
+	    if $fmtutil --all >>$MYTMP; then
 		rm $MYTMP
 		echo "   done."
             else

Reply to: