Discussion:
[tex-k] fmtutil problem
Alexey Vikhlinin
2012-04-08 21:32:02 UTC
Permalink
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
Karl Berry
2012-04-09 23:17:00 UTC
Permalink
Lion, TMPDIR is defined by default and it has a slash at the end.

How gratuitious and annoying.

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

Thanks. I made an equivalent change and pushed it out.

Best,
Karl
Arthur Reutenauer
2012-04-09 23:43:33 UTC
Permalink
Post by Alexey Vikhlinin
Lion, TMPDIR is defined by default and it has a slash at the end.
How gratuitious and annoying.
And it actually is the case on Snow Leopard too (Mac OS 10.6, Lion
being 10.7). How gratuitously annoying indeed.

Arthur

Loading...