[tex-live] Has anything changed in the order TL searches for packages?

Urs Liska lists at openlilylib.org
Thu May 17 10:26:21 CEST 2018



Am 17.05.2018 um 00:30 schrieb Karl Berry:
>      [fake dir already mentioned]
>
> Right, sorry.
>
> There is no intentional change in the path search list, and I doubt (but
> don't know for a fact) that Debian made such a change either.
>
> BTW, it does not reproduce for me with native TL.
>
>      lualatex finds the package in /usr/share/texlive
>      rather than that in ~/texmf. (While still kpsewhich finds the one
>      installed in $TEXMFHOME).
>
>      Anything I have to update or can do to investigate?
>
> 1) Since lualatex is involved, I'd start with mv ~/.texlive2018{,-prev}
> and see if it does any better. E.g., I wonder if the move of the
> lyluatex files in the update obsoleted its cache, but lualatex didn't
> notice. (The behavior of the lua(la)tex caching is unknown to me.)

When your post arrived I was just busy trying to remove *all* TeX from 
my system, since I suspected the issue might actually be caused by the 
fact that I have a home partition that has survived a number of 
installations over the years ...

After that I newly installed TeXLive from the downloaded installer.
Unfortunately still the same result.
I double-checked compiling documents with other custom packages that are 
accessed through that path, and they work, BTW, so the problem is 
clearly about the TeXLive version of the package being used first/instead.


>
> 2) The output of kpsewhich -var-value TEXMF might be interesting to
> ensure that $TEXMFHOME really does appear before $TEXMFDIST. I get:
>
> {{}/u/karl/.texlive2018/texmf-config,/u/karl/.texlive2018/texmf-var,/u/karl/texmf,!!/usr/local/texlive/texmf-local,!!/usr/local/texlive/2018/texmf-config,!!/usr/local/texlive/2018/texmf-var,!!/usr/local/texlive/2018/texmf-dist}
>
> (The empty braces at the beginning look weird but are ok.)

Well, my output looks similar and therefore correct too:

{{}/home/uliska/.texlive2018/texmf-config,/home/uliska/.texlive2018/texmf-var,/home/uliska/texmf,!!/usr/local/texlive/texmf-local,!!/usr/local/texlive/2018/texmf-config,!!/usr/local/texlive/2018/texmf-var,!!/usr/local/texlive/2018/texmf-dist}

>
> 3) You can see exactly what is being searched with
>    lualatex -kpathsea-debug=-1 lyluatex.sty </dev/null 2>/tmp/debug
> The output will be lengthy but should be definitive. Feel free to send
> it to me (gzipped) if need be. --best, karl.

I've done so.
When I search the result for lyluatex, the first occurences are those:

    kdebug:kpse_find_file: searching for lyluatex.sty of type tex (from
    texmf.cnf)
    kdebug:hash_lookup(try_std_extension_first.lualatex) => (nil)
    kdebug:hash_lookup(try_std_extension_first) => t
    kdebug:variable: try_std_extension_first = t
    kdebug:start generic search(files=[lyluatex.sty], must_exist=0,
    find_all=0,
    path=.:/home/uliska/.texlive2018/texmf-config/tex/lualatex//:/home/uliska/.texlive2018/texmf-var/tex/lualatex//:/home/uliska/texmf/tex/lualatex//:!!/usr/local/texlive/texmf-local/tex/lualatex//:!!/usr/local/texlive/2018/texmf-config/tex/lualatex//:!!/usr/local/texlive/2018/texmf-var/tex/lualatex//:!!/usr/local/texlive/2018/texmf-dist/tex/lualatex//:
    [etc.]


So it seems the *first* location is  ~/.texlive2018 but if I'm not 
completely mistaken there is nothing in there except a font cache:

    ~$ cd .texlive2018/
    uliska at elitebook-debian:~/.texlive2018$
    uliska at elitebook-debian:~/.texlive2018$ ls
    texmf-var
    uliska at elitebook-debian:~/.texlive2018$ ls -l
    insgesamt 4
    drwxr-xr-x 4 uliska uliska 4096 Mai 17 09:15 texmf-var
    uliska at elitebook-debian:~/.texlive2018$ ls -la
    insgesamt 12
    drwxr-xr-x  3 uliska uliska 4096 Mai 17 08:39 .
    drwxr-xr-x 91 uliska uliska 4096 Mai 17 09:00 ..
    drwxr-xr-x  4 uliska uliska 4096 Mai 17 09:15 texmf-var
    uliska at elitebook-debian:~/.texlive2018$ cd texmf-var/
    uliska at elitebook-debian:~/.texlive2018/texmf-var$ ls -la
    insgesamt 16
    drwxr-xr-x 4 uliska uliska 4096 Mai 17 09:15 .
    drwxr-xr-x 3 uliska uliska 4096 Mai 17 08:39 ..
    drwxr-xr-x 3 uliska uliska 4096 Mai 17 08:39 luatex-cache
    drwxr-xr-x 2 uliska uliska 4096 Mai 17 08:51 texdoc
    uliska at elitebook-debian:~/.texlive2018/texmf-var$ cd luatex-cache/
    uliska at elitebook-debian:~/.texlive2018/texmf-var/luatex-cache$ ls -la
    insgesamt 12
    drwxr-xr-x 3 uliska uliska 4096 Mai 17 08:39 .
    drwxr-xr-x 4 uliska uliska 4096 Mai 17 09:15 ..
    drwxr-xr-x 4 uliska uliska 4096 Mai 17 08:40 generic
    uliska at elitebook-debian:~/.texlive2018/texmf-var/luatex-cache$ cd
    generic/
    uliska at elitebook-debian:~/.texlive2018/texmf-var/luatex-cache/generic$
    ls -la
    insgesamt 16
    drwxr-xr-x 4 uliska uliska 4096 Mai 17 08:40 .
    drwxr-xr-x 3 uliska uliska 4096 Mai 17 08:39 ..
    drwxr-xr-x 3 uliska uliska 4096 Mai 17 08:40 fonts
    drwxr-xr-x 2 uliska uliska 4096 Mai 17 08:50 names


The next location is /home/uliska/texmf/tex/lualatex/, and I think 
*there* my 'local' package should have been found, since

    ~/texmf/tex/lualatex$ ls -la
    insgesamt 12
    drwxr-xr-x 3 uliska uliska 4096 Mai 16 16:36 .
    drwxr-xr-x 4 uliska uliska 4096 Mai 16 16:35 ..
    drwxr-xr-x 2 uliska uliska 4096 Mai 16 16:35 .dummy
    lrwxrwxrwx 1 uliska uliska   22 Mai 16 16:36 latex-git ->
    /home/uliska/git/latex

and lyluatex is a subdirectory of this 'latex-git'.

Looking for the exact location of the custom package file gives this:

    /tmp$ grep -n "latex-git/lyluatex/lyluatex.sty" debug-lyluatex
    1213:kdebug:hash_lookup(/home/uliska/texmf/tex/lualatex/latex-git/lyluatex/lyluatex.sty)
    => (nil)
    1214:kdebug:dir_links(/home/uliska/texmf/tex/lualatex/latex-git/lyluatex/lyluatex.sty)
    => -1
    1945:kdebug:returning from generic search([lyluatex.sty]) =>
    /home/uliska/texmf/tex/lualatex/latex-git/lyluatex/lyluatex.sty
    1949:kdebug:kpse_find_file: searching for
    /home/uliska/texmf/tex/lualatex/latex-git/lyluatex/lyluatex.sty of
    type tex (from texmf.cnf)
    1953:kdebug:start generic
    search(files=[/home/uliska/texmf/tex/lualatex/latex-git/lyluatex/lyluatex.sty],
    must_exist=0, find_all=0,
    path=.:/home/uliska/.texlive2018/texmf-config/tex/lualatex//:/home/uliska/.texlive2018/texmf-var/tex/lualatex//:/home/uliska/texmf/tex/lualatex//:!!/usr/local/texlive/texmf-local/tex/lualatex//:!!/usr/local/texlive/2018/texmf-config/tex/lualatex//:!!/usr/local/texlive/2018/texmf-var/tex/lualatex//:!!/usr/local/texlive/2018/texmf-dist/tex/lualatex//:/home/uliska/.texlive2018/texmf-config/tex/latex//:/home/uliska/.texlive2018/texmf-var/tex/latex//:/home/uliska/texmf/tex/latex//:!!/usr/local/texlive/texmf-local/tex/latex//:!!/usr/local/texlive/2018/texmf-config/tex/latex//:!!/usr/local/texlive/2018/texmf-var/tex/latex//:!!/usr/local/texlive/2018/texmf-dist/tex/latex//:/home/uliska/.texlive2018/texmf-config/tex/luatex//:/home/uliska/.texlive2018/texmf-var/tex/luatex//:/home/uliska/texmf/tex/luatex//:!!/usr/local/texlive/texmf-local/tex/luatex//:!!/usr/local/texlive/2018/texmf-config/tex/luatex//:!!/usr/local/texlive/2018/texmf-var/tex/luatex//:!!/usr/local/texlive/2018/texmf-dist/tex/luatex//:/home/uliska/.texlive2018/texmf-config/tex/generic//:/home/uliska/.texlive2018/texmf-var/tex/generic//:/home/uliska/texmf/tex/generic//:!!/usr/local/texlive/texmf-local/tex/generic//:!!/usr/local/texlive/2018/texmf-config/tex/generic//:!!/usr/local/texlive/2018/texmf-var/tex/generic//:!!/usr/local/texlive/2018/texmf-dist/tex/generic//:/home/uliska/.texlive2018/texmf-config/tex///:/home/uliska/.texlive2018/texmf-var/tex///:/home/uliska/texmf/tex///:!!/usr/local/texlive/texmf-local/tex///:!!/usr/local/texlive/2018/texmf-config/tex///:!!/usr/local/texlive/2018/texmf-var/tex///:!!/usr/local/texlive/2018/texmf-dist/tex///)
    1954:kdebug:
    absolute_search(/home/uliska/texmf/tex/lualatex/latex-git/lyluatex/lyluatex.sty)
    => /home/uliska/texmf/tex/lualatex/latex-git/lyluatex/lyluatex.sty
    1955:kdebug:returning from generic
    search([/home/uliska/texmf/tex/lualatex/latex-git/lyluatex/lyluatex.sty])
    => /home/uliska/texmf/tex/lualatex/latex-git/lyluatex/lyluatex.sty
    1956:kdebug:fopen(/home/uliska/texmf/tex/lualatex/latex-git/lyluatex/lyluatex.sty,
    rb) => 0x361c580
    4409:kdebug:hash_lookup(/home/uliska/texmf/tex/latex/latex-git/lyluatex/lyluatex.sty)
    => (nil)
    4410:kdebug:dir_links(/home/uliska/texmf/tex/latex/latex-git/lyluatex/lyluatex.sty)
    => -1
    6968:kdebug:hash_lookup(/home/uliska/texmf/tex/lualatex/latex-git/lyluatex/lyluatex.sty)
    => -1
    7768:kdebug:hash_lookup(/home/uliska/texmf/tex/latex/latex-git/lyluatex/lyluatex.sty)
    => -1


while

    /tmp$ grep "/usr/*/lyluatex" debug-lyluatex

returns nothing.

I think all of this clearly shows that kpsewhich finds the package in 
the ~/texmf path.

On the other hand, if I compile a MWE that just loads lyluatex like this

    \documentclass{article}
    \usepackage{lyluatex}
    \begin{document}
    Test
    \end{document}

I get the output

    $ lualatex mwe-lyluatex.tex
    This is LuaTeX, Version 1.07.0 (TeX Live 2018)
      restricted system commands enabled.
    (./mwe-lyluatex.tex
    LaTeX2e <2018-04-01> patch level 4
    (using write cache:
    /home/uliska/.texlive2018/texmf-var/luatex-cache/generic)(u
    sing read cache:
    /usr/local/texlive/2018/texmf-var/luatex-cache/generic /home/u
    liska/.texlive2018/texmf-var/luatex-cache/generic)
    luaotfload | main : initialization completed in 0.528 seconds
    (/usr/local/texlive/2018/texmf-dist/tex/latex/base/article.cls
    Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
    (/usr/local/texlive/2018/texmf-dist/tex/latex/base/size10.clo(load
    luc: /home/u
    liska/.texlive2018/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.l
    uc)))
    (/usr/local/texlive/2018/texmf-dist/tex/luatex/lyluatex/lyluatex.sty
    (/usr/local/texlive/2018/texmf-dist/tex/luatex/luatexbase/luatexbase.sty
    ...

which clearly shows that lyluatex is loaded from /usr/local/texlive.

Is there anything more I can investigate? I've also attached the log 
file, as compressing reduced the size from >8M to 200K.

Any further pointers or ideas would be highly appreciated. I really 
don't want to be forced to remove the texlive-music collection just to 
be able to run my own packages from the local repositories.

Thanks
Urs


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex-live/attachments/20180517/7da8077d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug-lyluatex.tar.xz
Type: application/x-xz
Size: 209980 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-live/attachments/20180517/7da8077d/attachment-0001.xz>


More information about the tex-live mailing list