diff --git a/texlive-filesystem.changes b/texlive-filesystem.changes index 687a9ba..8a92402 100644 --- a/texlive-filesystem.changes +++ b/texlive-filesystem.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu Jan 11 12:41:32 UTC 2018 - werner@suse.de + +- Add debug and force mode to the TeXLive update script which + might help to fix broken systems as well as might show some + debug messages as well. + +------------------------------------------------------------------- +Mon Jan 8 12:55:08 UTC 2018 - werner@suse.de + +- If zypper way of posttrans scripts are disabled do use the rpm + %posttrans scriptlets (boo#1074128) + ------------------------------------------------------------------- Fri Nov 24 12:46:53 UTC 2017 - werner@suse.de diff --git a/texlive-filesystem.spec b/texlive-filesystem.spec index c2ca1f3..88cca2f 100644 --- a/texlive-filesystem.spec +++ b/texlive-filesystem.spec @@ -1,7 +1,7 @@ # # spec file for package texlive-filesystem # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ %define texlive_version 2017 %define texlive_previous 2016 %define texlive_release 20170520 -%define texlive_noarch 132 +%define texlive_noarch 133 %define texlive_source texlive-20170520-source %define __perl_requires %{nil} @@ -13970,7 +13970,9 @@ fi %posttrans test -f /var/run/texlive/run-update || exit 0 +%if %{with zypper_posttrans} test -z "$ZYPP_IS_RUNNING" || exit 0 +%endif VERBOSE=false %{_texmfdistdir}/texconfig/update || : rm -f /var/run/texlive/run-update diff --git a/update.texlive b/update.texlive index 8dd9179..e449a1a 100644 --- a/update.texlive +++ b/update.texlive @@ -19,11 +19,22 @@ # Author: Werner Fink, 1997-2012,2016 # +if test -n "$1" -a "$1" = force; then + mkdir -p /var/run/texlive + for tag in run-mktexlsr run-hyphen \ + run-fmtutil.language run-fmtutil \ + run-fmtutil.refresh run-update + do + > /var/run/texlive/$tag + done +fi + # Empty directory means nothing todo test -d /var/run/texlive || exit 0 typeset -r OLDIFS="$IFS" typeset -i rc=0 +typeset -i nl=0 : ${VERBOSE=true} umask 022 @@ -67,6 +78,9 @@ atexit() if test $VERBOSE = true ; then exec 4> >(rotator) +elif test $VERBOSE = debug ; then + log=$(mktemp --tmpdir=/tmp update.XXXXXXXX) || exit 1 + exec 4> >(tee $log) else exec 4> /dev/null fi @@ -79,13 +93,13 @@ type -p mktexlsr &> /dev/null || { echo "${0##*/}: No mktexlsr in PATH ... sk # for run in /var/run/texlive/run-mktexlsr* ; do test -e $run || break - test $VERBOSE = true && echo -en "\r[ ]Updating TeX hash data base." + test $VERBOSE = true && { echo -en "\r[ ]Updating TeX hash data base."; let nl++; } mktexlsr < /dev/null 1>&4 2>&4 let rc+=$? - test $VERBOSE = true && echo rm -f /var/run/texlive/run-mktexlsr* > /var/run/texlive/sync-updmap done +((nl == 0)) || { echo; let nl=0; } type -p kpsewhich &> /dev/null || { echo "${0##*/}: No kpsewhich in PATH ... skipping" 1>&2; exit 0 ; } type -p md5sum &> /dev/null || { echo "${0##*/}: No md5sum in PATH ... skipping" 1>&2; exit 0 ; } @@ -214,6 +228,10 @@ if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then mv -f ${OLDMD5DIR}${cfg} ${MD5DIR}${cfg} done + md5_ldat=${MD5DIR}${cnf_ldat} + md5_ldef=${MD5DIR}${cnf_ldef} + md5_llua=${MD5DIR}${cnf_llua} + # # Handle hyphens # @@ -385,7 +403,7 @@ has_formats() # # Go further # -for run in /var/run/texlive/run-fmtutil* ; do +for run in /var/run/texlive/run-fmtutil.* /var/run/texlive/run-fmtutil ; do test -e "$run" || break type -p fmtutil-sys &> /dev/null || { echo "${0##*/}: No fmtutil-sys in PATH ... skipping" 1>&2; break; } option="" @@ -396,53 +414,53 @@ for run in /var/run/texlive/run-fmtutil* ; do set -- $(md5sum < ${cnf_ldat}) echo $1 > ${md5_ldat} if has_formats ${cnf_ldat} ; then - test $VERBOSE = true && echo -en "\r[ ]Handle language.dat setups." - fmtutil-sys ${option:+$option} --byhyphen ${cnf_ldat} < /dev/null 1>&4 2>&4 + test $VERBOSE = true && { echo -en "\r[ ]Handle language.dat setups."; let nl++; } + fmtutil-sys ${option:+$option} --byhyphen ${cnf_ldat} --no-strict < /dev/null 1>&4 2>&4 let rc+=$? - test $VERBOSE = true && echo + ((nl == 0)) || { echo; let nl=0; } fi fi if test -n "${cnf_ldef}" ; then set -- $(md5sum < ${cnf_ldef}) echo $1 > ${md5_ldef} if has_formats ${cnf_ldef} ; then - test $VERBOSE = true && echo -en "\r[ ]Handle language.def setups." - fmtutil-sys ${option:+$option} --byhyphen ${cnf_ldef} < /dev/null 1>&4 2>&4 + test $VERBOSE = true && { echo -en "\r[ ]Handle language.def setups."; let nl++; } + fmtutil-sys ${option:+$option} --byhyphen ${cnf_ldef} --no-strict < /dev/null 1>&4 2>&4 let rc+=$? - test $VERBOSE = true && echo + ((nl == 0)) || { echo; let nl=0; } fi fi if test -n "${cnf_llua}" ; then set -- $(md5sum < ${cnf_llua}) echo $1 > ${md5_llua} if has_formats ${cnf_llua} ; then - test $VERBOSE = true && echo -en "\r[ ]Handle language.dat.lua setups." - fmtutil-sys ${option:+$option} --byhyphen ${cnf_llua} < /dev/null 1>&4 2>&4 + test $VERBOSE = true && { echo -en "\r[ ]Handle language.dat.lua setups."; let nl++; } + fmtutil-sys ${option:+$option} --byhyphen ${cnf_llua} --no-strict < /dev/null 1>&4 2>&4 let rc+=$? - test $VERBOSE = true && echo + ((nl == 0)) || { echo; let nl=0; } fi fi ((rc != 0)) || rm -f /var/run/texlive/run-fmtutil.language ;; refresh) - test $VERBOSE = true && echo -en "\r[ ]Refresh TeX formats." - fmtutil-sys ${option:+$option} --refresh < /dev/null 1>&4 2>&4 + test $VERBOSE = true && { echo -en "\r[ ]Refresh TeX formats."; let nl++; } + fmtutil-sys ${option:+$option} --refresh --no-strict < /dev/null 1>&4 2>&4 let rc+=$? - test $VERBOSE = true && echo + ((nl == 0)) || { echo; let nl=0; } ((rc != 0)) || rm -f /var/run/texlive/run-fmtutil.refresh ;; - "") - test $VERBOSE = true && echo -en "\r[ ]Updating TeX formats." - fmtutil-sys ${option:+$option} --missing < /dev/null 1>&4 2>&4 + "/var/run/texlive/run-fmtutil") + test $VERBOSE = true && { echo -en "\r[ ]Missing TeX formats."; let nl++; } + fmtutil-sys ${option:+$option} --missing --no-strict < /dev/null 1>&4 2>&4 let rc+=$? - test $VERBOSE = true && echo + ((nl == 0)) || { echo; let nl=0; } ((rc != 0)) || rm -f /var/run/texlive/run-fmtutil ;; *) - test $VERBOSE = true && echo -en "\r[ ]Updating TeX format ${run#*fmtutil.}." + test $VERBOSE = true && { echo -en "\r[ ]Updating TeX format ${run#*fmtutil.}."; let nl++; } fmtutil-sys ${option:+$option} --byfmt "${run#*fmtutil.}" < /dev/null 1>&4 2>&4 let rc+=$? - test $VERBOSE = true && echo + ((nl == 0)) || { echo; let nl=0; } ((rc != 0)) || rm -f "${run}" esac done @@ -451,7 +469,7 @@ for run in /var/run/texlive/run-updmap* ; do test -e "$run" || break type -p updmap-sys &> /dev/null || { echo "${0##*/}: No updmap-sys in PATH ... skipping" 1>&2; break; } test -e "$cnf_umap" || break - test $VERBOSE = true && echo -en "\r[ ]Updating TeX font mappings." + test $VERBOSE = true && { echo -en "\r[ ]Updating TeX font mappings."; let nl++; } while read type map; do case "$type" in [Aa]dd*) @@ -481,18 +499,18 @@ for run in /var/run/texlive/run-updmap* ; do updmap-sys --cnffile $cnf_umap --nohash < /dev/null 1>&4 2>&4 let rc+=$? fi -# test $VERBOSE = true && echo ((rc == 0)) || continue rm -f /var/run/texlive/run-updmap* rm -f /var/run/texlive/sync-updmap* rm -f /var/run/texlive/run-mktexlsr* done +((nl == 0)) || { echo; let nl=0; } for run in /var/run/texlive/sync-updmap* ; do test -e "$run" || break type -p updmap-sys &> /dev/null || break test -e "$cnf_umap" || break - test $VERBOSE = true && echo -en "\r[ ]Updating TeX font mappings." + test $VERBOSE = true && { echo -en "\r[ ]Updating TeX font mappings."; let nl++; } updmap-sys --cnffile $cnf_umap --nohash --nomkmap --syncwithtrees < /dev/null 1>&4 2>&4 let rc+=$? enablemaps $cnf_umap < /dev/null 1>&4 2>&4 @@ -505,14 +523,14 @@ for run in /var/run/texlive/sync-updmap* ; do updmap-sys --cnffile $cnf_umap --nohash < /dev/null 1>&4 2>&4 let rc+=$? fi -# test $VERBOSE = true && echo ((rc == 0)) || continue rm -f /var/run/texlive/sync-updmap* rm -f /var/run/texlive/run-mktexlsr* done +((nl == 0)) || { echo; let nl=0; } if test -x /usr/bin/mtxrun ; then - test $VERBOSE = true && echo -en "\r[ ]Generate file database." + test $VERBOSE = true && { echo -en "\r[ ]Generate file database."; let nl++; } TEXMF=${TEXMFDIST} \ TEXMFCACHE=${TEXMFVAR} \ TEXMFCNF=${TEXMFCNFFILE%/*} \ @@ -533,8 +551,8 @@ if test -x /usr/bin/mtxrun ; then LUAINPUTS="$(kpsewhich --var-value=LUAINPUTS)" \ /usr/bin/luaotfload-tool --update --prefer-texmf --formats=+afm --log=stdout < /dev/null 1>&4 2>&4 fi - test $VERBOSE = true && echo fi +((nl == 0)) || { echo; let nl=0; } # # If texmf.cnf has changed it may contain changed memory sizes @@ -542,12 +560,12 @@ fi # type -p texconfig-sys &> /dev/null || exit 0 if test $init = true ; then - test $VERBOSE = true && echo -en "\r[ ]Initialize TeX configuration and font mappings." + test $VERBOSE = true && { echo -en "\r[ ]Initialize TeX configuration and font mappings."; let nl++; } updmap-sys --cnffile $cnf_umap --syncwithtrees < /dev/null 1>&4 2>&4 let rc+=$? texconfig-sys init < /dev/null 1>&4 2>&4 let rc+=$? - test $VERBOSE = true && echo + ((nl == 0)) || { echo; let nl=0; } fi # @@ -853,34 +871,34 @@ esac if test $omd5modes = 0 -o \ \( $md5modes = $omd5modes -a "$prtcap_nt_mfont" = "yes" -a "$md5_nt_mfont" = "yes" \) then - test $VERBOSE = true && echo -en "\r[ ]Set MetaFont mode." + test $VERBOSE = true && { echo -en "\r[ ]Set MetaFont mode."; let nl++; } env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys mode $PRINTER < /dev/null 1>&4 2>&4 let rc+=$? set -- $(md5sum < ${cnf_mfont}) echo $1 > ${md5_mfont} - test $VERBOSE = true && echo + ((nl == 0)) || { echo; let nl=0; } fi if test $omd5xdvi = 0 -o \ \( $md5xdvi = $omd5xdvi -a "$prtcap_nt_xdvi" = "yes" -a "$md5_nt_xdvi" = "yes" \) then - test $VERBOSE = true && echo -en "\r[ ]Set XDvi paper size." + test $VERBOSE = true && { echo -en "\r[ ]Set XDvi paper size."; let nl++; } env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys xdvi paper $XDVISIZE < /dev/null 1>&4 2>&4 let rc+=$? set -- $(md5sum < ${cnf_xdvi}) echo $1 > ${md5_xdvi} - test $VERBOSE = true && echo + ((nl == 0)) || { echo; let nl=0; } fi if test $omd5dvips = 0 -o \ \( $md5dvips = $omd5dvips -a "$prtcap_nt_dvips" = "yes" -a "$md5_nt_dvips" = "yes" \) then - test $VERBOSE = true && echo -en "\r[ ]Set dvips mode and paper size." + test $VERBOSE = true && { echo -en "\r[ ]Set dvips mode and paper size."; let nl++; } env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys dvips mode $PRINTER < /dev/null 1>&4 2>&4 let rc+=$? env -i MKTEXLSR=true PATH=$PATH LANG=$LANG texconfig-sys dvips paper $DVIPSSIZE < /dev/null 1>&4 2>&4 let rc+=$? set -- $(md5sum < ${cnf_dvips}) echo $1 > ${md5_dvips} - test $VERBOSE = true && echo + ((nl == 0)) || { echo; let nl=0; } fi if test "$prtcap_nt_dvips" = "manual" -a \ \( $md5dvips = $omd5dvips -o $omd5dvips = 0 \)