commit:     4dd44867d1710a50b2d79ca095c935d283572555
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  4 18:54:55 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Wed Jun  5 09:39:59 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4dd44867

eclass/texlive-common: call non-empty ${ROOT}

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 <AT> gentoo.org>

 eclass/texlive-common.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
index 4b357897f12..8476b117eef 100644
--- a/eclass/texlive-common.eclass
+++ b/eclass/texlive-common.eclass
@@ -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

Reply via email to