install-tl change of behavior for setting TEXMFHOME ?

Karl Berry karl at freefriends.org
Tue Jun 21 03:11:09 CEST 2022


Hi Scott,

    If I put "echo $HOME" inside the script, and I run the script with sudo,
    it echos "/root".

It is puzzling. Can you show us the exact script, or say exactly how to
reproduce? I can't find any prior special case for root. ~ always
expands to $HOME (on Unix), so far as I can see. For example:
$ env HOME=/foobar kpsewhich -var-value TEXMFHOME                      
/foobar/texmf

So, if you don't change TEXMFHOME in your script, the value in the
distributed /.../texmf-dist/web2c/texmf.cnf should be what's active, and
that is ~/texmf.  Unless you weren't root, or otherwise changed HOME
when you ran TEXMFHOME, I can't see how that would expand to anything
other than /root/texmf.

But, one thing has changed (and maybe we should undo it): if you do
change TEXMFHOME in the installer to, say, ~/junk, what will get written
to /.../texmf.cnf (the top-level texmf.cnf, not the one in texmf-dist)
will have the tilde expanded at the time of installation:
TEXMFHOME = /root/junk

In the past, we literally wrote the tilde, so the top texmf.cnf would
have contained:
TEXMFHOME = ~/junk

Which, depending on the circumstances in which you're running the
various commands, could explain it. Please advise ... --thanks, karl.


More information about the tex-live mailing list.