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.
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.
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.
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
I inspected /usr/share/texmf-dist/web2c/texmfcnf.lua, and it is seriously broken.
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.
/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.
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.
https://github.com/archlinux/svntogit-packages/commit/43af7cc2eab080ea4f333159833e714376cb2cad Arch Linux includes its own patched version of texmfcnf.lua because the upstream version is broken.
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.
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".