1
0
2017-07-11 14:09:14 +00:00
committed by Git OBS Bridge
parent c67d94f051
commit e472b578aa
2 changed files with 77 additions and 31 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
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

View File

@@ -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,47 @@ 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 egine required
do
required="${required##* }"
required="$(kpsewhich "${required#\*}" 2>/dev/null)"
test -e "$required" || continue
fmt="$(find ${WEB2C} -name "${egine}.fmt" -o -name "${egine}.mem" -o -name "${egine}.base")"
test -e "$fmt" || continue
test "$fmt" -nt "$TEXMFCNFFILE" || init=true
test "$fmt" -nt "$required" && continue
case "${fmt##*.}" in
fmt)
> /var/run/texlive/run-fmtutil.refresh ;;
base|mem)
fmtutil-sys --byfmt "$egine" ;;
esac
done < <(sed -r "/^(\#.*|[[:blank:]]*)$/d" "$cnf_fmtu")
unset egine fmt required
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 +257,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 +275,28 @@ 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 egine required
do
case "$required" in
*language.*) ;;
*) continue ;;
esac
language=language${required#*language}
language=${language%% *}
required="${required##* }"
required="$(kpsewhich "${required#\*}" 2>/dev/null)"
test -e "$required" || continue
fmt="$(find ${WEB2C} -name "${egine}.fmt")"
test -e "$fmt" || continue
for cfg in ${cnf_ldat} ${cnf_ldef} ${cnf_llua}
do
test $language = "${cfg##*/}" || continue
test $fmt -nt $cfg && continue
> /var/run/texlive/run-fmtutil.language
break 2
done
done < <(sed -r "/^(\#.*|[[:blank:]]*)$/d" "$cnf_fmtu")
unset egine fmt required
fi
tcfmgr ()
@@ -451,22 +507,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