I recently reported a bug of mktexlsr to texlive upstream and learnt that mktexlsr is not supposed to be a symlink to mktexlsr.pl: The shell script mktexlsr is faster and not supposed to be replaced by the perl script yet. In fact, the perl script is not well tested; similarly for tlmgr and perhaps a few other scripts. The full thread starts here: https://tug.org/pipermail/tex-k/2024-June/004073.html The fix in the ebuild is apparently just to replace the order of the following two lines in TEXLIVE_MODULE_BINSCRIPTS (or to remove the latter completely): texmf-dist/scripts/texlive/mktexlsr texmf-dist/scripts/texlive/mktexlsr.pl
TL developer Reinhard Kotucha commented to this bug report: The symlink to texmf-dist/scripts/texlive/mktexlsr.pl has to be *removed* without substitution from TEXLIVE_MODULE_BINSCRIPTS. The Perl script is needed on Windows only because we can't execute shell scripts there. And it's well maintained and tested (maybe not by Norbert because he's on Unix for reasons I understand very well). At least no Windows user complained so far. A symlink to the Perl script mktexlsr.pl should *never* be created on any Unix system. > Is there anything else which is “obviously” wrong? No, but I'm wondering how all this can happen. Gentoo is a source distribution where everything is compiled from scratch. When I compile TeX Live on Unix myself, only a symlink to the shell script is created. This is expected behavior. Thus I suppose that a Gentoo developer stumbled over the Perl script and thought that it had been overlooked by TeX Live developers, not knowing that it's only needed on Windows.
First some background: Unfortunately we have to pass --enable-linked-scripts=no to texlive-core and rely on an alternative logic to install Tex Live's binscripts and binlinks. This predates my involvement with Tex Live packaging in Gentoo, but I believe one reason this was done, and IIRC still has to be done, is that some linked scripts are not part of app-text/texlive-core, but in dev-texlive/texlive-*. Basically, what we do is to parse upstream's scripts.lst [1] and see if it matches a file that will be potentially installed by the Gentoo package and create the symlink. Looking at scripts.lst, there are a few files with the same basename but different extensions. For example memoize-clean.(pl|py), memoize-extract.(pl|py). Of course, we could simply drop the right duplicates from TEXLIVE_MODULE_BINSCRIPTS, but this has the obvious downside that issues like these could sneak in. We may need to figure out how texlive decides that mktexlsr.pl shouldn't be used. Maybe it is texmf_other_scripts [2] as these seem to be only installed on WIN32 [3]. So we could simply not put anything that is listed in texmf_other_scripts in TEXLIVE_MODULE_BINSCRIPTS. But let's see what the TeX Live developers have to say. I read that they are aware of this bug and just wait till the 24h grace period is over until they can comment. 1: https://git.texlive.info/texlive/tree/Build/source/texk/texlive/linked_scripts/scripts.lst 2: https://github.com/TeX-Live/texlive-source/blob/bccffde3479a4ec103b2d3a9e46fd942c5bed92e/texk/texlive/linked_scripts/Makefile.am#L103 3: https://github.com/TeX-Live/texlive-source/blob/bccffde3479a4ec103b2d3a9e46fd942c5bed92e/texk/texlive/linked_scripts/Makefile.am#L309-L318
(In reply to Florian Schmaus from comment #2) (Not sure if I understand correctly, but if you mean grace period as in "can't comment after making a new account", the rule is "can't comment a URL for 24 hours after account is made").
Seems like we were lucky enough to hit a narrow time window of just a few days where mktexlsr.pl was part of scripts.lst. I'll wait for a reply from Karl if there are other similar scripts, but besides the memoize scripts nothing else stands out.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a62d05a70af1c31eaa570750c3c5c34a87f1452 commit 3a62d05a70af1c31eaa570750c3c5c34a87f1452 Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2024-07-24 08:03:50 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2024-07-24 08:55:05 +0000 app-text/texlive-core: add 2023-r10 Closes: https://bugs.gentoo.org/934975 Signed-off-by: Florian Schmaus <flow@gentoo.org> app-text/texlive-core/texlive-core-2023-r10.ebuild | 495 +++++++++++++++++++++ 1 file changed, 495 insertions(+) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1d53098fc180cb71f44d4412de0bbb19a578349 commit e1d53098fc180cb71f44d4412de0bbb19a578349 Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2024-07-24 08:07:46 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2024-07-24 08:55:07 +0000 dev-texlive/texlive-pictures: add 2023_p69409-r3 Bug: https://bugs.gentoo.org/934975 Signed-off-by: Florian Schmaus <flow@gentoo.org> .../texlive-pictures-2023_p69409-r3.ebuild | 632 +++++++++++++++++++++ 1 file changed, 632 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80b8f8c5d911fa2aef00d3f7110663f35e88e627 commit 80b8f8c5d911fa2aef00d3f7110663f35e88e627 Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2024-07-24 08:06:29 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2024-07-24 08:55:06 +0000 dev-texlive/texlive-binextra: add 2023_p69527-r5 Bug: https://bugs.gentoo.org/934975 Signed-off-by: Florian Schmaus <flow@gentoo.org> .../texlive-binextra-2023_p69527-r5.ebuild | 311 +++++++++++++++++++++ 1 file changed, 311 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be38b2c896e463aa2fe3c9af095513f781e62aa3 commit be38b2c896e463aa2fe3c9af095513f781e62aa3 Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2024-07-15 19:55:13 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2024-07-24 08:55:05 +0000 texlive-common.eclass: Add TEXLIVE_SCRIPTS_W_FILE_EXT variable Some scripts are supposed to be installed with file extensions [1, 2]. Add support for declaring those scripts in a new elcass variable TEXLIVE_SCRIPTS_W_FILE_EXT. Also use pure-bash functions to retrieve the basename and strip the file extensions. And use "declare -l" to lowercase the value of 'trg', instead of 'tr' [3]. 1: https://tug.org/pipermail/tldistro/2024q3/000485.html 2: https://github.com/TeX-Live/texlive-source/blob/c087bab35570b1d5cb0afd272611a7a4ec3c9e38/texk/texlive/linked_scripts/Makefile.am#L332-L333 3: https://github.com/TeX-Live/texlive-source/blob/c087bab35570b1d5cb0afd272611a7a4ec3c9e38/texk/texlive/linked_scripts/Makefile.am#L330 Bug: https://bugs.gentoo.org/934975 Signed-off-by: Florian Schmaus <flow@gentoo.org> eclass/texlive-common.eclass | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)