[tex-live] $TEXMFHOME not working right

Reinhard Kotucha reinhard.kotucha at web.de
Mon May 17 01:20:54 CEST 2010

On 16 May 2010 Manuel Pégourié-Gonnard wrote:

 > Le 16/05/2010 04:49, Reinhard Kotucha a écrit :
 > > On 15 May 2010 Khaled Hosny wrote:
 > > 
 > >  > I certainly didn't complain, but it was a very frustrating experience
 > >  > first time I started adding stuff to TEXMFHOME and tex still can not
 > >  > find it, I'm very glad this have been "fixed".
 > > 
 > > Sure, this can happen.  But if you didn't know that you have to run
 > > texhash, how did you know where exactly you have to put your files?
 > > You certainly have to read documentation if you want to install files
 > > in TEXMFHOME.  There is much more you can do wrong.
 > > 
 > Because you heard about it from a colleague or an incomplete documentation?
 > As a matter of personal experience, a few years ago, when I first tried to
 > install something in my TEXMFHOME, I did two mistakes:
 > - not running mktexlsr (it was TL05)
 > - not putting tex input files in a "tex" subdirectory
 > and I remember it took me a long time to understand.
 > Now, there's one less standard mistake to make. That's a Good Thing
 > IMO.

Well, you still can do the same mistake if you install in TEXMFLOCAL.
And this is what most people do on their own machines.

 > > What we have now solves a tiny problem for people who didn't read
 > > the documentation.  They have to be in luck if their files are
 > > found at all (if they didn't read any documentation), and the
 > > system is slow by default.
 > Well, it's slow only on nfs mounts with big texmfhome trees (which
 > is not exactly the most common case).

Sure, the size matters.  But the NFS issue Robin mentioned is by far
not the worst case.  NFS is a bit slower than a local file system
because each time you access a file it has to check whether the copy
in the cache of the client is up-to-date.  

Suppose that you have TEXMFHOME on a USB stick.  On Linux I usually
mount the stick manually.  Then all files are in the cache and I
actually don't notice that they are on a USB stick.  If people are
using an automounter, I suppose that the cache is cleared if the
timeout is reached.  Under Windows, files on a USB stick are not
cached at all.  It's horribly slow.

Nevertheless, having TEXMFHOME on a USB stick makes sense.

 > >  Is this really what we want?
 > > 
 > Do we really want to engage now in a discussion about something
 > that was already decided three years ago?

As I said, I noticed yesterday that texhash creates an ls-R file when
it's called with an argument, regardless of the value of TEXMFDBS.
People who used getnonfreefonts in the past *have* an ls-R file in
TEXMFHOME already.  BTW, I don't know how to solve this problem in
getnonfreefonts reasonably.  And I don't know whether it's reasonable
at all not to use an ls-R file in this case.

If you run getnonfreefonts --all, you'll have about 100 directories in
TEXMFHOME which will be scanned each time.  And in the near future
I'll add support for two new font packages which means that there will
be even much more directories soon.

Manuel, you said:

 > Now, there's one less standard mistake to make. [...]

You have to add the word "probably".

The current situation is:

  * You have to run texhash if you install in TEXMFLOCAL.

  * You don't have to run texhash if you install in TEXMFHOME, at
    least unless there is an ls-R file already.

This is *very* confusing, IMO.

TeX Live is a huge system and if we want to keep it manageable, we
have to make things as consistent as possible.  I'm convinced that
consistency is *much* more important than exceptions which make life a
little bit easier for people who didn't read the documentation.

And once there is an ls-R file in TEXMFHOME already, it's used by
kpathsea, but texhash won't update it because it's not in TEXMFDBS.
In order to update an existing ls-R file in TEXMFHOME you have to say

  texhash `kpsewhich -var-value=TEXMFHOME`

Just running texhash without an argument isn't sufficient.

***PLEASE*** try to explain this to users.

The more I think about it, the more I'm convinced that removing
TEXMFHOME from TEXMFDBS was a *** VERY BAD *** idea.  It causes more
problems than it solves.

It's better to add TEXMFHOME to TEXMFDBS in texmf.cnf again.
Everything will be easier then.  Definitely.


Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the tex-live mailing list