eclass/texlive-common: call non-empty ${ROOT}
authorMikle Kolyada <zlogene@gentoo.org>
Tue, 4 Jun 2019 18:54:55 +0000 (21:54 +0300)
committerMikle Kolyada <zlogene@gentoo.org>
Wed, 5 Jun 2019 09:39:59 +0000 (12:39 +0300)
EAPI=7 introduces empty ROOT variable if the actual root
is defined as "/", this leads to the false-negative
texmf-update and fmtutil calls.

Closes: https://bugs.gentoo.org/687306

Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
eclass/texlive-common.eclass

index 4b357897f12a86bed0f50b18a8636cb60f74b464..8476b117eefff5a4d54f71990cba15e426a572af 100644 (file)
@@ -140,7 +140,7 @@ dobin_texmf_scripts() {
 
 etexmf-update() {
        if has_version 'app-text/texlive-core' ; then
-               if [ "$ROOT" = "/" ] && [ -x "${EPREFIX}"/usr/sbin/texmf-update ] ; then
+               if [ -n ${ROOT%/} ] && [ -x "${EPREFIX}"/usr/sbin/texmf-update ] ; then
                        "${EPREFIX}"/usr/sbin/texmf-update
                else
                        ewarn "Cannot run texmf-update for some reason."
@@ -158,7 +158,7 @@ etexmf-update() {
 
 efmtutil-sys() {
        if has_version 'app-text/texlive-core' ; then
-               if [ "$ROOT" = "/" ] && [ -x "${EPREFIX}"/usr/bin/fmtutil-sys ] ; then
+               if [ -n ${ROOT%/} ] && [ -x "${EPREFIX}"/usr/bin/fmtutil-sys ] ; then
                        einfo "Rebuilding formats"
                        "${EPREFIX}"/usr/bin/fmtutil-sys --all &> /dev/null
                else