Eugene Konev reminded me (in #debian-bugs) that a fix is needed to the
postrm as well. Since kpsewhich can return both fmt and efmt, the
trivial thing is to look for both:

        # remove fmt and efmt files
        XMLTEXFMT=$(kpsewhich xmltex.efmt xmltex.fmt) || true
        PDFXMLTEXFMT=$(kpsewhich pdfxmltex.efmt pdfxmltex.fmt) || true
        rm -f $XMLTEXFMT $PDFXMLTEXFMT


The more complete attached patch does that.


Don Armstrong

-- 
America was far better suited to be the World's Movie Star. The
world's tequila-addled pro-league bowler. The world's acerbic bi-polar
stand-up comedian. Anything but a somber and tedious nation of
socially responsible centurions.
 -- Bruce Sterling, _Distraction_ p122

http://www.donarmstrong.com              http://rzlab.ucr.edu
--- old/xmltex-1.9/debian/postinst      2005-06-01 20:53:42.000000000 -0700
+++ xmltex-1.9/debian/postinst  2005-06-01 20:51:21.000000000 -0700
@@ -105,15 +105,28 @@
     # check whether it actually worked, since the texconfig program
     # doesn't exit non-zero
 
+    if grep -q '^xmltex[[:space:]]*tex' $FMTDIR/40xmltex.cnf; then
+       xml_fmt="xmltex.fmt";
+    else
+       xml_fmt="xmltex.efmt";
+    fi;
+
+    if grep -q '^pdfxmltex[[:space:]]*pdftex' $FMTDIR/40xmltex.cnf; then
+       pdf_fmt="pdfxmltex.fmt";
+    else
+       pdf_fmt="pdfxmltex.efmt";
+    fi;
+
+
     # file exists test
     local goterror
     goterror=false
-    if ! kpsewhich xmltex.efmt > /dev/null ; then
-        warn "ERROR: XMLTeX memory dump (xmltex.efmt) cannot be found"
+    if ! kpsewhich $xml_fmt > /dev/null ; then
+        warn "ERROR: XMLTeX memory dump ($xml_fmt) cannot be found"
         goterror=true
     fi
-    if ! kpsewhich pdfxmltex.efmt > /dev/null ; then
-        warn "ERROR: PDFXMLTeX memory dump (pdfxmltex.efmt) cannot be found"
+    if ! kpsewhich $pdf_fmt > /dev/null ; then
+        warn "ERROR: PDFXMLTeX memory dump ($pdf_fmt) cannot be found"
         goterror=true
     fi
 
--- old/xmltex-1.9/debian/postrm        2005-06-01 20:53:42.000000000 -0700
+++ xmltex-1.9/debian/postrm    2005-06-01 21:30:33.000000000 -0700
@@ -12,9 +12,9 @@
 
 case "$1" in
     remove)
-       # remove fmt files
-       XMLTEXFMT=$(kpsewhich xmltex.efmt) || true
-       PDFXMLTEXFMT=$(kpsewhich pdfxmltex.efmt) || true
+       # remove fmt and efmt files
+       XMLTEXFMT=$(kpsewhich xmltex.efmt xmltex.fmt) || true
+       PDFXMLTEXFMT=$(kpsewhich pdfxmltex.efmt pdfxmltex.fmt) || true
        rm -f $XMLTEXFMT $PDFXMLTEXFMT
 
        # remove fmt file logs

Reply via email to