When ROOT is set (e.g. with "emerge --root" or in /etc/portage/make.conf), texlive-common.eclass doesn't call texmf-update or fmtutil-sys. But if those tools can be found in $ROOT, there is probably also a whole gentoo system in there (you are installing things into $ROOT therefore it wouldn't hurt to add more files with texmf-update or fmtutil-sys). Reproducible: Always Steps to Reproduce: 1. mkdir /tmp/foo 2. mount --bind / /tmp/foo 3. emerge --root /tmp/foo -1 dev-libs/kpathsea Actual Results: ``` * Cannot run texmf-update for some reason. * Your texmf tree might be inconsistent with your configuration * Please try to figure what has happened ``` Expected Results: ``` Configuring TeXLive ... Generating /etc/texmf/web2c/texmf.cnf from /etc/texmf/texmf.d ... Generating /etc/texmf/web2c/fmtutil.cnf from /etc/texmf/fmtutil.d ... ... ``` Cause: `if [ "$ROOT" = "/" ]` in `etexmf-update()` and `efmtutil-sys()` in texlive-common.eclass takes the simple approach of giving a not very helpful warning :) Suggested Fix: (Additionally: Add "|| die" at the end of the chroot lines?) The following, tested in my /etc/portage/make.conf, works for me. ``` etexmf-update() { if has_version 'app-text/texlive-core' ; then if [ -x "${EROOT}"/usr/sbin/texmf-update ] ; then chroot "${ROOT}" "${EPREFIX}"/usr/sbin/texmf-update else ewarn "${EROOT}/usr/sbin/texmf-update is not executable." ewarn "Your texmf tree might be inconsistent with your configuration." fi fi } efmtutil-sys() { if has_version 'app-text/texlive-core' ; then if [ -x "${EROOT}"/usr/bin/fmtutil-sys ] ; then einfo "Rebuilding formats" chroot "${ROOT}" "${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null else ewarn "${EROOT}/usr/bin/fmtutil-sys is not executable." ewarn "Your formats might be inconsistent with your installed ${PN} version." fi fi } ```
chrooting wont work when cross-compiling; the tools should be made root-aware, that is: they must not touch anything in / when ROOT!=/, which I doubt is the case without heavy patching, but I might be wrong and it might just be about setting the proper variables