diff --git a/texlive-filesystem.changes b/texlive-filesystem.changes index abecdb1..cae8b29 100644 --- a/texlive-filesystem.changes +++ b/texlive-filesystem.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Jul 12 07:41:21 UTC 2017 - werner@suse.de + +- Generate/remove specific formats at installation/erease of a + package (boo#1046277) + +------------------------------------------------------------------- +Tue Jul 11 12:00:53 UTC 2017 - werner@suse.de + +- Modify update.texlive script in such a way that we detect old + format files and enforce a refresh based on hyphen (boo#1046277) + ------------------------------------------------------------------- Tue Jun 13 10:38:52 UTC 2017 - werner@suse.de diff --git a/update.texlive b/update.texlive index 9b04c74..0ef07aa 100644 --- a/update.texlive +++ b/update.texlive @@ -107,6 +107,14 @@ unset KPSE_DOT || true : ${WEB2C:=$TEXMFVAR/web2c} test -L "$TEXMFCNFFILE" && TEXMFCNFFILE="$(readlink -f "$TEXMFCNFFILE" 2> /dev/null)" +# +# Configuration broken +# +if test ! -e "$TEXMFCNFFILE" ; then + echo "${0##*/}: Configuration of texlive installation not found." 1>&2 + exit 0 +fi + # # Language and hyphenation setup # @@ -137,6 +145,57 @@ if test -z "$cnf_llua" ; then cnf_llua=$(TEXMF=$TEXMFSYSCONFIG kpsewhich language.dat.lua 2> /dev/null) fi +# +# Do some sanity checks as well +# +for hyp in ${TEXMFDIST}/tex/generic/config/language.splits/hyphen* +do + test -e "$hyp" || continue + suffix=${hyp##*/} + suffix=${suffix#*.} + case "$suffix" in + dat.lua) + test "$hyp" -nt "$cnf_llua" ;; + dat) + test "$hyp" -nt "$cnf_ldat" ;; + def) + test "$hyp" -nt "$cnf_ldef" ;; + esac && { + > /var/run/texlive/run-hyphen + > /var/run/texlive/run-fmtutil.language + } +done +unset hyp suffix + +init=false +while read format engine language rest +do + line=($rest) + last=${line[-1]} + inifile=${last#\*} + case "$engine" in + mpost) fmt="$format.mem"; kpse=mpost; engine=metapost ;; + mf|mfw|mf-nowin) fmt="$format.base"; kpse=mf; engine=metafont ;; + *) fmt="$format.fmt"; kpse=tex; engine=$engine ;; + esac + inifile=$(kpsewhich -progname=$format -format=$kpse $inifile 2>/dev/null) || continue + fmt="$(find ${WEB2C}/$engine -name $fmt)" + if test -z "$fmt" + then +# init=true +# > /var/run/texlive/run-fmtutil + continue + fi + test "$fmt" -nt "$TEXMFCNFFILE" || init=true + test "$fmt" -nt "$inifile" && continue + case "$engine" in + mpost) fmtutil-sys --byfmt "$egine" < /dev/null 1>&4 2>&4 ;; + mf|mfw|mf-nowin) fmtutil-sys --byfmt "$egine" < /dev/null 1>&4 2>&4 ;; + *) > /var/run/texlive/run-fmtutil.refresh + esac +done < <(sed -r "/^(\#.*|[[:blank:]]*)$/d" "$cnf_fmtu") +unset format engine language rest line last inifile fmt kpse engine + if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then for cfg in ${cnf_ldat} ${cnf_ldef} ${cnf_llua} ; do test -s ${OLDMD5DIR}${cfg} || continue @@ -208,19 +267,16 @@ if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then omd5ldef=0 omd5llua=0 if test -e ${md5_ldat} -a -r ${md5_ldat} ; then - test ${md5_ldat} -nt ${cnf_ldat} && md5_nt_ldat="yes" set -- $(cat ${md5_ldat}) ; omd5ldat="$1" elif test ! -d ${md5_ldat%/*} ; then mkdir -p ${md5_ldat%/*} fi if test -e ${md5_ldef} -a -r ${md5_ldef} ; then - test ${md5_ldef} -nt ${cnf_ldef} && md5_nt_ldef="yes" set -- $(cat ${md5_ldef}) ; omd5ldef="$1" elif test ! -d ${md5_ldef%/*} ; then mkdir -p ${md5_ldef%/*} fi if test -e ${md5_llua} -a -r ${md5_llua} ; then - test ${md5_llua} -nt ${cnf_llua} && md5_nt_llua="yes" set -- $(cat ${md5_llua}) ; omd5llua="$1" elif test ! -d ${md5_llua%/*} ; then mkdir -p ${md5_llua%/*} @@ -229,18 +285,31 @@ if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then # # Create new formats for new language.dat and/or language.def if needed # - if test $omd5ldat = 0 -o \( $md5ldat != $omd5ldat -o "$md5_nt_ldat" != "yes" \) - then - > /var/run/texlive/run-fmtutil.language - fi - if test $omd5ldef = 0 -o \( $md5ldef != $omd5ldef -o "$md5_nt_ldef" != "yes" \) - then - > /var/run/texlive/run-fmtutil.language - fi - if test $omd5llua = 0 -o \( $md5llua != $omd5llua -o "$md5_nt_llua" != "yes" \) - then - > /var/run/texlive/run-fmtutil.language - fi + while read format engine language rest + do + line=($rest) + last=${line[-1]} + inifile=${last#\*} + case "$engine" in + mpost) continue ;; + mf|mfw|mf-nowin) continue ;; + *) fmt="$format.fmt"; kpse=tex; engine=$engine ;; + esac + inifile=$(kpsewhich -progname=$format -format=$kpse $inifile 2>/dev/null) || continue + fmt="$(find ${WEB2C}/$engine -name $fmt)" + test -z "$fmt" && continue + for lang in ${language//,/ } + do + for cfg in ${cnf_ldat} ${cnf_ldef} ${cnf_llua} + do + test $lang = "${cfg##*/}" || continue + test $fmt -nt $cfg && continue + > /var/run/texlive/run-fmtutil.language + break 3 + done + done + done < <(sed -r "/^(\#.*|[[:blank:]]*)$/d" "$cnf_fmtu") + unset format engine language lang rest line last inifile fmt kpse engine fi tcfmgr () @@ -347,13 +416,19 @@ for run in /var/run/texlive/run-fmtutil* ; do test $VERBOSE = true && echo ((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 let rc+=$? test $VERBOSE = true && echo ((rc != 0)) || rm -f /var/run/texlive/run-fmtutil ;; + *) + test $VERBOSE = true && echo -en "\r[ ]Updating TeX format ${run#*fmtutil.}." + fmtutil-sys ${option:+$option} --byfmt "${run#*fmtutil.}" < /dev/null 1>&4 2>&4 + let rc+=$? + test $VERBOSE = true && echo + ((rc != 0)) || rm -f /var/run/texlive/run-fmtutil esac done @@ -451,22 +526,6 @@ fi # of various programs. # type -p texconfig-sys &> /dev/null || exit 0 - -# -# Configuration broken -# -if test ! -e "$TEXMFCNFFILE" ; then - echo "${0##*/}: Configuration of texlive installation not found." 1>&2 - exit 0 -fi - -init=false -for f in $(find ${WEB2C}/ -name '*.fmt' -name '*.mem' -o -name '*.base') ; do - test -e "$f" || continue - test -L "$f" && continue - test "$TEXMFCNFFILE" -nt "$f" && init=true - test -s "$f" && touch "$f" -done if test $init = true ; then test $VERBOSE = true && echo -en "\r[ ]Initialize TeX configuration and font mappings." updmap-sys --cnffile $cnf_umap --syncwithtrees < /dev/null 1>&4 2>&4