Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 740442 - app-text/texlive-2020-r7 dev-texlive/texlive-context-2020 does not find its scripts
Summary: app-text/texlive-2020-r7 dev-texlive/texlive-context-2020 does not find its s...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-05 07:05 UTC by Meino Cramer
Modified: 2022-08-16 13:21 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Meino Cramer 2020-09-05 07:05:25 UTC
Removed all previous installations of texlive and friends. Freshly installed texlive (USE:X context detex dvi2tty epspdf extra games graphics humanities luatex metapost music png pstricks publishers science tex4ht texi2html truetype xetex xml -cjk -pdfannotextractor L10N="de en -af -ar -as -bg -bn -br -ca -cs -cy -da -el -eo -es -et -eu -fa -fi -fr -ga -gl -gu -he -hi -hr -hsb -hu -hy -ia -id -is -it -ja -kn -ko -la -lo -lt -lv -ml -mn -mr -nb -nl -nn -no -or -pa -pl -pt -rm -ro -ru -sa -sco -sk -sl -sq -sr -sv -ta -te -th -tk -tr -uk -vi -zh"), which installs texlive-context, which includes ConTeXt MK IV to which I refer here. Installation does not report any error. Tried `context somefile.tex, which fails with:
mtxrun          | unknown script 'context.lua' or 'mtx-context.lua'
Recommended solution: Run `mtxrun --generate`. BUG(1): This command tries to index the whole harddisk from the point from where it is started. Guessed workaround: export TEXMF=/usr/share/texmf-dist:/usr/share/texmf-site ; mtxrun --generate, which limits mtx-run to those directories. While TEXMF is set this way `context doc.tex` works kind of but complains of a lot of "confusing file"s in its database (~/.texlive2019).
A strace log shows access to paths, from which '/usr/share/' was replaced with './' -- access failed therefore.
Setting TEXMF this way is not a solution or workaround -- it was only a tinkering to get a glimpse of the underlaying problem as such.
It seems, that either context does not "see" the setup at /etc/texmf or a certain initial environment variable is not set. 
LaTeX and plainTeX are working fine out of the box though.

Reproducible: Always

Steps to Reproduce:
1.Install texlive with given USE-flags (given above)
2.Try to context one of these examples: https://github.com/hmenke/context-examples
3.Do mtxrun --generate (fails)
4.Set TEXMF as given above
5. Do 3. again...
6. Do 2. again
Actual Results:  
ConTeXt is not useable "out of the box"/suggested mtxrun-call behaves not as expected (indexes the whole harddisk including "confusing file"s). 
Setting TEXMF as described is invalid at most - despite it might create a result in this case.

Expected Results:  
After installation of texlive-2020 with the USE flags given above, mtxrun --generate` has to index the relevant files under $TEXMFSITE and $TEXMFDIST. Settings given below /etc/texmf should be respected by context. 

mtxrun --variables reports a lot of "unset" but expected environment variables.
Comment 1 Meino Cramer 2020-09-05 16:50:48 UTC
Additional information:
I installed the ConTeXt distribution (https://wiki.contextgarden.net/Installation) and it has worked out of the box -- even without running mtxrun --generate beforehand, which is done by the context command on itsself when detecting, that ~/.texlive2019 is invalid.
Indexing with mtxrun --generate indexed the correct parts without all the
"confusing file" messages.
The ConTeXt-distribution is ok and valid as such. Something has gone wrong with
its configuration when embedded into the GENTOO texlive package, it seems.
Comment 2 amano.kenji 2022-08-13 12:43:29 UTC
Has anything been fixed? texlive-2021 still has the same issue.

$ context --version
mtxrun          | unknown script 'context.lua' or 'mtx-context.lua'

After `export TEXMF=/usr/share/texmf-dist`,

$ context --version
resolvers       | globbing | confusing filename, name: 'custMatTransform.py', lower: 'custmattransform.py', already: 'CustMatTransform.py'
resolvers       | globbing | confusing filename, name: 'setCustomAnchor.py', lower: 'setcustomanchor.py', already: 'SetCustomAnchor.py'
resolvers       | globbing | confusing filename, name: 'widg_addLabel.py', lower: 'widg_addlabel.py', already: 'Widg_addLabel.py'
resolvers       | globbing | confusing filename, name: 'widg_addPolyOpt.py', lower: 'widg_addpolyopt.py', already: 'Widg_addPolyOpt.py'
resolvers       | globbing | confusing filename, name: 'widg_editBezier.py', lower: 'widg_editbezier.py', already: 'Widg_editBezier.py'
mtx-context     | ConTeXt Process Management 1.03
mtx-context     |
mtx-context     | main context file: /usr/share/texmf-dist/tex/context/base/mkiv/context.mkiv
mtx-context     | current version: 2020.03.10 14:44
mtx-context     | main context file: /usr/share/texmf-dist/tex/context/base/mkiv/context.mkxl
mtx-context     | current version: 2020.03.10 14:44

There should be no `confusing filename`s, but I'm getting them.

I really don't know what went wrong.
Comment 3 amano.kenji 2022-08-13 13:41:40 UTC
https://mailman.ntg.nl/pipermail/ntg-context/2020/099404.html seems to suggest that dev-texlive/texlive-basic needs to fix /usr/share/texmf-dist/web2c/texmfcnf.lua
Comment 4 amano.kenji 2022-08-14 02:21:11 UTC
I inspected /usr/share/texmf-dist/web2c/texmfcnf.lua, and it is seriously broken.
Comment 5 amano.kenji 2022-08-14 02:38:39 UTC
It turns out that /usr/share/texmf-dist/web2c/texmfcnf.lua installed by dev-texlive/texlive-basic-2021 is horribly outdated. The file is from 2012.
Comment 6 amano.kenji 2022-08-14 02:58:47 UTC
/usr/share/texmf-dist/web2c/texmfcnf.lua comes from tl-luatex-2021.tar.xz which is installed by dev-texlive/texlive-basic-2021.

I think tl-luatex-2021.tar.xz is actually something like tl-luatex-2012.tar.xz.
Comment 7 amano.kenji 2022-08-14 03:03:28 UTC
Actually, debian's texlive-base_2022.20220722.orig.tar.xz contains the same outdated texmfcnf.lua.

It seems that texlive needs to bupdate texmfcnf.lua.
Comment 8 amano.kenji 2022-08-14 03:14:24 UTC
https://github.com/archlinux/svntogit-packages/commit/43af7cc2eab080ea4f333159833e714376cb2cad

Arch Linux includes its own patched version of texmfcnf.lua because the upstream version is broken.
Comment 9 amano.kenji 2022-08-14 04:32:33 UTC
By copying Arch Linux texlive-core's texmfcnf.lua to /usr/share/texmf-dist/web2c/texmfcnf.lua, the issue is fixed.

But, each user still needs to execute `mtxrun --generate` before using ConTeXt.
Comment 10 amano.kenji 2022-08-16 13:21:12 UTC
For now, dev-texlive/texlive-basic should set TEXMFSYSVAR="selfautoparent:/var/lib/texmf", TEXMFDIST="selfautodir:share/texmf-dist", TEXMFSYSCONFIG="selfautodir:/etc/texmf" in /usr/share/texmf-dist/web2c/texmfcnf.lua.

Arch Linux also sets TEXMFOS="selfautodir:share" in texmfcnf.lua, but context runs fine after running `mtxrun --generate` without TEXMFOS="selfautodir:share".