[xml/sgml-pkgs] Bug#262395: patch to fix this by checking to see whether efmt or fmt is supposed to be made

Don Armstrong Don Armstrong <don@debian.org>, 262395@bugs.debian.org
Wed, 1 Jun 2005 20:57:59 -0700


--HlL+5n6rz5pIUxbD
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

The following rather trivial patch seems to clear up this issue here.
[Someone better at shell could probably make it slightly cleaner...
just thank $DEITY that I didn't decide to write it in perl. ;-)]

The basic idea is just to see if fmtutil is going to make an efmt or
fmt, and then check for the existence of the appropriate file.


Don Armstrong

--=20
Of course, there are ceases where only a rare individual will have the
vision to perceive a system which governs many people's lives; a
system which had never before even been recognized as a system; then
such people often devote their lives to convincing other people that
the system really is there and that it aught to be exited from.=20
 -- Douglas R. Hofstadter _G=F6del Escher Bach. Eternal Golden Braid_

http://www.donarmstrong.com              http://rzlab.ucr.edu

--HlL+5n6rz5pIUxbD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="262395_patch.diff"

--- 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
 

--HlL+5n6rz5pIUxbD--