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

Bug#64914: tetex-bin's fmtutil has no extensibility mechanism



On Mon, Feb 19, 2001 at 11:18:55AM -0500, Adam Di Carlo wrote:
> 
> I think this would be a good idea.  An alternative idea would be to
> have a folder, /etc/texmf/fmt.d/, and then provide a silly little
> shell script to cat /etc/texmf/fmt.d/* > /etc/texmf/fmtutil.cnf and
> run fmtutil.cnf.
> 
> Actually, I like Anthony's scheme better because
> /etc/texmf/fmtutil.cnf is a config file and might have local
> customizations, and people might edit it then be suprised why it
> doesn't work anymore.

I like your solution: it is extremely simple and that's a real
virtue.  The easiest way to do it is probably something like the
following, although this obviously has limitations:

fmtutil.wrapper:
#! /bin/sh

unset TMPFILE
trap 'test -n "$TMPFILE" && test -f "$TMPFILE" && rm -f "$TMPFILE"' \
   0 1 2 3 7 13 15

TMPFILE=`mktemp -q /tmp/fmtutil.cnf.XXXXXX`
if [ $? -ne 0 ]; then
    echo "$0: Can't create temp file, exiting..."
    exit 1
fi
cat /etc/texmf/fmtutil.cnf /etc/texmf/fmt.d/*.cnf >> $TMPFILE
fmtutil --cnffile $TMPFILE

A similar thing will need to be done for texlinks.

Then in the maintainer scripts and texconfig, replace the calls to
fmtutil and texlinks by calls to fmtutil.wrapper and
texlinks.wrapper.

The alternative is to hack the original fmtutil and texlinks so that
they can handle a whole directory if some new option is given, and to
use that option in texconfig and the maintainer scripts (with a
symlink /etc/texmf/fmtutil.d/fmtutil.cnf -> /etc/texmf/fmtutil.cnf).
But that looks significantly harder.

   Julian

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

         Julian Gilbey, Dept of Maths, Queen Mary, Univ. of London
       Debian GNU/Linux Developer,  see http://people.debian.org/~jdg
  Donate free food to the world's hungry: see http://www.thehungersite.com/



Reply to: