[tex-k] fmtutil problem

Alexey Vikhlinin avikhlinin at cfa.harvard.edu
Sun Apr 8 23:32:02 CEST 2012


Hi,

I am experience problems with fmtutil on Mac/Lion (texlive-2011). It hangs on one of the kpsewhich calls (the one at the end of the parse_line function).

I've traced the problem to the way tmpdir is set in the 'main' function: on the Lion, TMPDIR is defined by default and it has a slash at the end. E.g. in my case, 
/var/folders/_w/v97v_b3j0ljfgby2_bwmb_xm0000ky/T/

The tmpdir variable becomes 
/var/folders/_w/v97v_b3j0ljfgby2_bwmb_xm0000ky/T//fmtutil.$$

and this is added in front of the search kpsewhich search path elsewhere in the script. Because it has two backslashes, kpsewhich searches go inside subdirectories in the upper-level folder, /var/folders/_w/v97v_b3j0ljfgby2_bwmb_xm0000ky/T, which contains stuff like Photoshop etc. Kpsewhich then hangs inside one of those folders in which it has no business looking.

Either setting TMPDIR to /var/folders/_w/v97v_b3j0ljfgby2_bwmb_xm0000ky/T  (without a backslash at the end) or removing double backslashes from tmpdir inside the script, e.g. by adding 

  tmpdir=`echo $tmpdir | sed 's/\/\//\//g'`

after tmpdir is set inside the 'main' function, fixes the problem.

Alexey Vikhlinin





More information about the tex-k mailing list