[tex-live] tlmgr cannot install packages

Reinhard Kotucha reinhard.kotucha at web.de
Mon Nov 10 02:11:57 CET 2008


George N. White III writes:
 > On Sun, Nov 9, 2008 at 12:30 AM, Reinhard Kotucha
 >> And please *****NEVER***** set $TEXMFCNF unless you are absolutely

 > <http://wiki.contextgarden.net/Debian_installation>
 > 
 > I think the context minimal linux distribution sets TEXMFCNF (maybe to
 > avoid problems if one has been set by the user).

Hi George,
thanks for the link.  I don't think that Context actually needs
TEXMFCNF.  Of course, if it already exists and points to the wrong
place, it's better to remove it.

texmf.cnf is always found without TEXMFCNF if the directory structure
is kept intact.  kpathsea looks for texmf.cnf files in a list of
directories.  There can be more than one texmf.cnf file and variables
set in one file will not be overwritten by another one.

The search order is:

  /path/to/texlive/bin/<platform>
  /path/to/texlive/bin
  /path/to/texlive
  /path/to/texlive/texmf/web2c

If you set TEXMFCNF=/path/to/texlive/texmf/web2c then only one
texmf.cnf file is found.  At a first glance this looks ok.  But
unfortunately you cannot put your local modifications into this one
because it is part of the distribution and it can happen that it is
replaced by a newer version by the updater.

Thus, TL-2008 provides a more or less empty texmf.cnf file
/path/to/texlive/texmf.cnf where users can make local changes.  This
will never be overwritten by the updater.

The nasty thing is that if you set TEXMFCNF, then only the config file
provided by the distribution is found.  You don't notice any problem
at all but if you have to change a setting locally later, it will not
work and it's absolutely not obvious why.

Setting TEXMFCNF in the environment means disabling some of kpathsea's
functionality.  The compiled-in defaults are fine for almost everybody.

Regarding Context:  As far as I know Context is updated quite
frequently.  Hence it would be nice if people can put local settings
into a file which is not overwritten by an update.  Nothing has to be
done except of getting rid of the nasty TEXMFCNF environment variable.

BTW, since a texmf.cnf file is first looked up in
/path/to/texlive/bin/<platform> , it's a nice opportunity to set
platform specific stuff there, for instance OSFONTDIR.
 
 > If you manage to install a dvi viewer on a debian system without
 > a tex distro, you get en error when texmf.cnf is not found.

It has nothing to do with the environment.  It seems to be a
dependency problem.  Does Debian provide xdvi as a separate package?
xdvi is a shell script which depends on kpsewhich and some files in
the texmf tree and finally launches xdvi.bin.

A standalone xdvi could probably be created by just compiling it
without kpathsea, but it's something someone has to maintain and the
benefit is quite doubtful.

If xdvi doesn't find texmf.cnf, then the most likely reason is that
texmf.cnf doesn't exist, at least, sigh, if TEXMFCNF is not set. 

 > Some viewers may work if the environment setting overrides a
 > compiled in debian location.

There is no reason for Debian to compile absolute paths into the
binaries and it would be tremendously strange if they would do.  All
binaries linked against kpathsea will find their config files
(texmf.cnf) relative to their location in the file system.

I believe that the main reason why many people think that they have to
set TEXMFCNF is that the kpathsea concept is quite unique and almost
nobody is aware about this brilliant concept and how it works.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
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