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

Re: SVN tetex commit: r405 - in tetex-bin/trunk/debian: . patches



Julian Gilbey <jdg@polya.uklinux.net> wrote:

> On Wed, Dec 14, 2005 at 10:03:51AM +0100, Frank K?ster wrote:
>> Julian Gilbey <jdg@costa.debian.org> wrote:
>> 
>> > Log:
>> > * {texconfig,fmtutil,updmap}-sys: improve handling to avoid spurious
>> >   warnings when fmtutil is called from texconfig-sys (Closes: #343172)
>> > * fmtutil: change $scriptname back to $progname to simplify patch
>> 
>> Have you checked whether running mktexfmt still works as root?  The
>> problem why I introduced scriptname was that after exporting progname,
>> it would make a call like
>> 
>> pdfetex --ini --progname=fmtutil-sys latex.ini
>> 
>> which of course fails...
>
> Does appear to work.  In the current fmtutil, $progname is basically
> only used for messages.

No, it's not that simple, unfortunately, and your change would reopen
bug #334613.  To reproduce it, 

$ quilt push patch-deb
$ su
# apt-get install jadetex
# cp texk/tetex/fmtutil /usr/local/bin/
# cp texk/tetex/fmtutil-sys /usr/local/bin/
# ln -s fmtutil /usr/local/bin/mktexfmt
# rm /var/lib/texmf/web2c/latex.fmt
# rm /var/lib/texmf/web2c/jadetex.fmt
# fmtutil-sys --missing

The problem is this code:

case $RUNNING_AS_SYS in
  "") progname=fmtutil ;;
  *)  progname=fmtutil-sys ;;
esac

: ${argv0:=$0}
export argv0

This is what happens:

- fmtutil-sys sets variables and invokes fmtutil (the first incarnation)

- fmtutil sets progname to fmtutil-sys and exports argv0 as
  /usr/bin/fmtutil

- it creates latex.fmt, but in a temporary directory (not in kpathsea's
  search path)

- it calls pdfeTeX --ini to create jadetex.fmt, but since latex.fmt is
  not yet available, pdfeTeX/kpathsea call "mktexfmt latex.fmt"

- since mktexfmt is a symlink to fmtutil, a second incarnation of
  fmtutil is invoked.  This time, argv0 is already set (to
  /usr/bin/fmtutil); no change is made.  progname also is already
  fmtutil-sys, so fmtutil-sys is not called, it just proceeds to option
  processing. 

- Now fmtutil doesn't recognize the single option "latex.fmt", which it
  would only if argv0 was mktexfmt.

This particular problem can be solved by changing

: ${argv0:=$0}

to

argv0=$0

However, you probably had a reason to do it this way.

Regards, Frank
-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer



Reply to: