fixing kpathsea

N. Andrew Walsh n.andrew.walsh at gmail.com
Fri Nov 15 10:29:09 CET 2019


Hi Norbert,

On Fri, Nov 15, 2019 at 4:41 AM Norbert Preining <preining at logic.at> wrote:

>
> The binaries are in /usr/bin, I suppose?
>

correct (though tlmgr.pl appears to be
in /usr/share/texmf-dist/scripts/texlive/)

Thus the binaries are in /[$HOME]/tex-local/texlive/2017/bin/[ARCH]/
>

also correct.


>
> > a separate install, and I use this tlmgr to update this install *only*. I
> > am uncertain why, but this local install uses root permissions, but only
>
> What does that mean, uses root permissions? What are the permissions of
> the files?
>         ls -l  /[$HOME]/tex-local/texlive/2017/bin/[ARCH]/tlmgr
>

 $ ls -l [$HOME]/tex-local/texlive/2017/bin/x86_64-linux/tlmgr
lrwxrwxrwx 1 root root 41 25. Nov 2016
 [$HOME]/tex-local/texlive/2017/bin/x86_64-linux/tlmgr ->
../../texmf-dist/scripts/texlive/tlmgr.pl


>
>
> Well, then the gentoo packages are broken, right? I guess they are 2018
> or 2019, right?
>

the installed ones are 2017. I'm trying to update to 2019, and this is
what's failing.


> They use the correct /usr/bin binaries, but the calls to fmtutil
> don't work, because fmtutil needs mktexlsr.pl, and gentoo seems having
> failed to install that one.
>

/usr/share/texmf-dist/scripts/texlive/mktexlsr.pl was installed by the
texlive-basic-2019 gentoo package. So It's there.



>
> Looking at https://forums.gentoo.org/viewtopic-t-1098680-start-0.html
> I see this is a common issue, and that means that either the gentoo
> packages are broken (what I assume), or there is a misconfiguration.
>
> Can you show me the content of
>         /etc/texmf/texmf.d/05searchpaths.cnf
>
[big code block incoming]
------------------------------------------------------------------
[following the preamble]:
TEXMFROOT = $SELFAUTODIR/share

% The main tree of distributed packages and programs:
TEXMFDIST = $TEXMFROOT/texmf-dist

% We used to have a separate /texmf tree with some core programs and files.
% Keep the variable name.
TEXMFMAIN = $TEXMFDIST

% The Gentoo site tree
TEXMFSITE = $TEXMFROOT/texmf-site

% Local additions to the distribution trees.
TEXMFLOCAL = $TEXMFROOT/../local/share/texmf

% TEXMFSYSVAR, where *-sys store cached runtime data.
TEXMFSYSVAR = $SELFAUTOPARENT/var/lib/texmf
% TEXMFSYSCONFIG, where *-sys store configuration data.
TEXMFSYSCONFIG = $SELFAUTOPARENT/etc/texmf

% Per-user texmf tree(s) -- organized per the TDS, as usual.  To define
% more than one per-user tree, set this to a list of directories in
% braces, as described above.  (This used to be HOMETEXMF.)  ~ expands
% to %USERPROFILE% on Windows, $HOME otherwise.
TEXMFHOME = ~/texmf

% TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
TEXMFVAR = ~/.texlive/texmf-var

% TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
TEXMFCONFIG = ~/.texlive/texmf-config

% This is the value manipulated by tlmgr's auxtrees subcommand in the
% root texmf.cnf. Kpathsea warns about a literally empty string for a
% value, hence the empty braces.
TEXMFAUXTREES = {}

% List all the texmf trees. For an explanation of what they are, see the
% TeX Live manual.
%
% For texconfig to work properly, TEXMFCONFIG and TEXMFVAR should be named
% explicitly and before other trees.
%
 TEXMFLOCAL precedes TEXMFDIST because locally-installed versions
% should take precedence over distribution files -- although it is
% generally a source of confusion to have different versions of a
% package installed, whatever the trees, so try to avoid it.
%
% The odd-looking $TEXMFAUXTREES$TEXMF... construct is so that if no
auxtree is
% ever defined (the 99% common case), no extra elements will be added to
% the search paths. tlmgr takes care to end any value with a trailing comma.
TEXMF =
{$TEXMFAUXTREES$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFSITE,!!$TEXMFDI>

% Where to look for ls-R files.  There need not be an ls-R in the
% directories in this path, but if there is one, Kpathsea will use it.
% By default, this is only the !! elements of TEXMF, so that mktexlsr
% does not create ls-R files in the non-!! elements -- because if an
% ls-R is present, it will be used, and the disk will not be searched.
% This is arguably a bug in kpathsea.
TEXMFDBS =
{!!$TEXMFLOCAL,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFSITE,!!$TEXMFDIST}

% The system trees.  These are the trees that are shared by all users.
% If a tree appears in this list, the mktex* scripts will use
% VARTEXFONTS for generated files, if the original tree isn't writable;
% otherwise the current working directory is used.
SYSTEXMF = $TEXMFSYSVAR;$TEXMFLOCAL;$TEXMFSITE;$TEXMFDIST
% First writable tree here is used by Lua(La)TeX for the font cache.
% LuaLaTeX uses the value here, while ConTeXt uses the same variable but
% from texmfcnf.lua; therefore the two values should be kept in sync.
% (As should everything else in texmf.cnf <-> texmfcnf.lua.)
TEXMFCACHE = $TEXMFSYSVAR;$TEXMFVAR

% We use GLOBALVARTEXFONTS in order to always be able to search in the
global
% font cache even if VARTEXFONTS is overridden.
GLOBALVARTEXFONTS = $SELFAUTOPARENT/var/cache/fonts

% Where generated fonts may be written.  This tree is used when the sources
% were found in a system tree and either that tree wasn't writable, or the
% varfonts feature was enabled in MT_FEATURES in mktex.cnf.
VARTEXFONTS = $GLOBALVARTEXFONTS

% On some systems, there will be a system tree which contains all the font
% files that may be created as well as the formats.  For example
%   TEXMFVAR = /var/lib/texmf
% is used in many distros.  In this case, set VARTEXFONTS like this
%VARTEXFONTS = $TEXMFVAR/fonts
% and do not mention it in TEXMFDBS (but _do_ mention TEXMFVAR).
%
% Remove $VARTEXFONTS from TEXMFDBS if the VARTEXFONTS directory is below
% one of the TEXMF directories (avoids overlapping ls-R files).
------------------------------------------------------------


> and the output of
>         /usr/bin/kpsewhich -var-value TEXMFROOT
>

/


>         /usr/bin/kpsewhich -var-value TEXMFMAIN
>

//texmf-dist/


>         /usr/bin/kpsewhich -var-value TEXMFDIST
>

//texmf-dist


>
>
> Furthermore, **HOW** do you try to update the gentoo packages, as root
> or using sudo?
>

as root


>
> In any case, send the value of $PATH for **root** when the update is
> started.
>
/sbin:/bin:/usr/sbin:/usr/bin


>
> To make this clear: You **MUST**NOT** have
>         /[$HOME]/tex-local/texlive/2017/bin/[ARCH]/
> in the PATH of root!!!
>

ordinarily I do not. I tried adding the local TL path, but that didn't help.



>
>
> > > That is a Gentoo bug. They have not patched tlmgr.pl so that it finds
> > > the correct modules.
> > >
> >
> > gentoo's devs keep telling me that this is an error with my own kpathsea
> > setup, and not with the packages. Further, they tell me to add the TUG TL
>
> That is wrong, at 99% ...
>
> > In short: I want to manage my user-directory TUG TL using its own tlmgr,
> > but use the system packages to update the system TL, and not have them
> > conflict, or interact in any way. How do I do this?
>
> - ensure the PATH for root is correct (depends on whether you use
>   sudo, sudo -E, su, su -, ...)
> - ensure that the TEXMFROOT variable expands correctly.
>

given that TEXMFROOT returns "/", is it safe to assume this variable is set
incorrectly?

Thanks for the help!

A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex-live/attachments/20191115/8c4de857/attachment-0001.html>


More information about the tex-live mailing list