Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 719272 - dev-libs/kpathsea-[6.3.1_p20190410 | 6.3.2_p20200406]: do not set TEXMFROOT in Prefix
Summary: dev-libs/kpathsea-[6.3.1_p20190410 | 6.3.2_p20200406]: do not set TEXMFROOT i...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-24 18:15 UTC by Steven Trogdon
Modified: 2021-01-21 16:33 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 Steven Trogdon 2020-04-24 18:15:42 UTC
In Prefix

$ kpsewhich -var-value=TEXMFROOT

returns an empty string. It should return

EPREFIX/usr/share

In EPREFIX/etc/texmf/texmf.d/05searchpaths.cnf we have

TEXMFROOT = $SELFAUTODIR/share

Now SELFAUTODIR is defined

$ kpsewhich -var-value=SELFAUTODIR
/storage/strogdon/gentoo-rap/usr

My texlive install:

app-text/texlive-2019-r1
app-text/texlive-core-2019-r10
dev-texlive/texlive-basic-2019-r1
dev-texlive/texlive-bibtexextra-2019
dev-texlive/texlive-fontsextra-2019
dev-texlive/texlive-fontsrecommended-2019
dev-texlive/texlive-fontutils-2019
dev-texlive/texlive-formatsextra-2019
dev-texlive/texlive-langenglish-2019
dev-texlive/texlive-langgerman-2019
dev-texlive/texlive-latex-2019
dev-texlive/texlive-latexextra-2019-r2
dev-texlive/texlive-latexrecommended-2019-r2
dev-texlive/texlive-luatex-2019
dev-texlive/texlive-mathscience-2019
dev-texlive/texlive-pictures-2019
dev-texlive/texlive-plaingeneric-2019
dev-texlive/texlive-pstricks-2019
dev-texlive/texlive-xetex-2019

This affects the building of certain pdf docs as in

kpathsea: Running mktexfmt pdflatex.fmt
/storage/strogdon/gentoo-rap/usr/bin/mktexfmt: kpsewhich -var-value=TEXMFROOT failed, aborting early.
BEGIN failed--compilation aborted at /storage/strogdon/gentoo-rap/usr/bin/mktexfmt line 25.
I can't find the format file `pdflatex.fmt'!
Latexmk: fls file doesn't appear to have been made.
Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 1
Comment 1 Steven Trogdon 2020-04-25 17:47:16 UTC
The problem is that in both of the above kpathsea ebuilds the created symlinks

kpathsea-6.3.1_p20190410.ebuild:

    dosym /etc/texmf/web2c/fmtutil.cnf ${TEXMF_PATH}/web2c/fmtutil.cnf
    dosym /etc/texmf/web2c/texmf.cnf ${TEXMF_PATH}/web2c/texmf.cnf

and

kpathsea-6.3.2_p20200406.ebuild

    dosym /../../../../etc/texmf/web2c/fmtutil.cnf ${TEXMF_PATH}/web2c/fmtutil.cnf
    dosym /../../../../etc/texmf/web2c/texmf.cnf ${TEXMF_PATH}/web2c/texmf.cnf

do not point to locations in the Prefix. The former creates symlinks to locations on the host and I believe the latter does the same. This results in a broken kpathsea install. The following works here (in Prefix):

    dosym ${EPREFIX}/etc/texmf/web2c/fmtutil.cnf ${TEXMF_PATH}/web2c/fmtutil.cnf
    dosym ${EPREFIX}/etc/texmf/web2c/texmf.cnf ${TEXMF_PATH}/web2c/texmf.cnf
Comment 2 François Bissey 2020-04-27 05:43:08 UTC
I am guessing the following would work if you want to keep things relative

    dosym /../../../../etc/texmf/web2c/fmtutil.cnf ${TEXMF_PATH#${EPREFIX}}/web2c/fmtutil.cnf
    dosym /../../../../etc/texmf/web2c/texmf.cnf ${TEXMF_PATH#${EPREFIX}}/web2c/texmf.cnf
Comment 3 Steven Trogdon 2020-12-07 05:12:11 UTC
dev-libs/kpathsea-6.3.1_p20190410 is no longer in the portage tree and something has changed relative to dev-libs/kpathsea-6.3.2_p20200406. 

First, TEXMFROOT is now set??

$ kpsewhich -var-value=TEXMFROOT
/storage/strogdon/gentoo-rap/usr/share

Second, the dosym statements (I believe these may have changed - possibly a silent bump?)

        dosym ../../../../etc/texmf/web2c/fmtutil.cnf ${TEXMF_PATH}/web2c/fmtutil.cnf
        dosym ../../../../etc/texmf/web2c/texmf.cnf ${TEXMF_PATH}/web2c/texmf.cnf

now install symlinks correctly.

However, thirdly the installed symlinks

${EPREFIX}/usr/share/texmf-dist/web2c/updmap-hdr.cfg
${EPREFIX}/usr/share/texmf-dist/web2c/fmtutil-hdr.cfg

are incorrect

$ ls -al ~/usr/share/texmf-dist/web2c/updmap-hdr.cfg 
lrwxrwxrwx 1 terry terry 33 Dec  5 16:38 /storage/strogdon/gentoo-rap/usr/share/texmf-dist/web2c/updmap-hdr.cfg -> /etc/texmf/web2c.d/updmap-hdr.cfg

$ ls -al ~/usr/share/texmf-dist/web2c/fmtutil-hdr.cnf 
lrwxrwxrwx 1 terry terry 34 Dec  5 16:38 /storage/strogdon/gentoo-rap/usr/share/texmf-dist/web2c/fmtutil-hdr.cnf -> /etc/texmf/web2c.d/fmtutil-hdr.cnf

They do not point to locations in the Prefix.

Perhaps this bug should be closed and a new one opened?
Comment 4 Steven Trogdon 2020-12-07 05:23:15 UTC
Actually, the incorrect symlinks

$ ls -al ~/usr/share/texmf-dist/web2c/updmap-hdr.cfg 
lrwxrwxrwx 1 terry terry 33 Dec  5 16:38 /storage/strogdon/gentoo-rap/usr/share/texmf-dist/web2c/updmap-hdr.cfg -> /etc/texmf/web2c.d/updmap-hdr.cfg

$ ls -al ~/usr/share/texmf-dist/web2c/fmtutil-hdr.cnf 
lrwxrwxrwx 1 terry terry 34 Dec  5 16:38 /storage/strogdon/gentoo-rap/usr/share/texmf-dist/web2c/fmtutil-hdr.cnf -> /etc/texmf/web2c.d/fmtutil-hdr.cnf

are installed by app-text/texlive-core-2020-r12 not by dev-libs/kpathsea-6.3.2_p20200406. So this bug should be closed and a new one opened. See bug https://bugs.gentoo.org/show_bug.cgi?id=752189 for a related symlink problem.
Comment 5 Fabian Groffen gentoo-dev 2021-01-21 16:33:33 UTC
ok, so I hope I'm not reading this wrong, but it seems the current version in the tree fixes the original issue, so now we continue on bug 752189