forked from pool/texlive-filesystem
Accepting request 509705 from Publishing:TeXLive
- Generate/remove specific formats at installation/erease of a package (boo#1046277) - Modify update.texlive script in such a way that we detect old format files and enforce a refresh based on hyphen (boo#1046277) OBS-URL: https://build.opensuse.org/request/show/509705 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/texlive-filesystem?expand=0&rev=20
This commit is contained in:
commit
2bedfb41c4
@ -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
|
Tue Jun 13 10:38:52 UTC 2017 - werner@suse.de
|
||||||
|
|
||||||
|
123
update.texlive
123
update.texlive
@ -107,6 +107,14 @@ unset KPSE_DOT || true
|
|||||||
: ${WEB2C:=$TEXMFVAR/web2c}
|
: ${WEB2C:=$TEXMFVAR/web2c}
|
||||||
test -L "$TEXMFCNFFILE" && TEXMFCNFFILE="$(readlink -f "$TEXMFCNFFILE" 2> /dev/null)"
|
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
|
# 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)
|
cnf_llua=$(TEXMF=$TEXMFSYSCONFIG kpsewhich language.dat.lua 2> /dev/null)
|
||||||
fi
|
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
|
if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" -a -n "${cnf_llua}" ; then
|
||||||
for cfg in ${cnf_ldat} ${cnf_ldef} ${cnf_llua} ; do
|
for cfg in ${cnf_ldat} ${cnf_ldef} ${cnf_llua} ; do
|
||||||
test -s ${OLDMD5DIR}${cfg} || continue
|
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
|
omd5ldef=0
|
||||||
omd5llua=0
|
omd5llua=0
|
||||||
if test -e ${md5_ldat} -a -r ${md5_ldat} ; then
|
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"
|
set -- $(cat ${md5_ldat}) ; omd5ldat="$1"
|
||||||
elif test ! -d ${md5_ldat%/*} ; then
|
elif test ! -d ${md5_ldat%/*} ; then
|
||||||
mkdir -p ${md5_ldat%/*}
|
mkdir -p ${md5_ldat%/*}
|
||||||
fi
|
fi
|
||||||
if test -e ${md5_ldef} -a -r ${md5_ldef} ; then
|
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"
|
set -- $(cat ${md5_ldef}) ; omd5ldef="$1"
|
||||||
elif test ! -d ${md5_ldef%/*} ; then
|
elif test ! -d ${md5_ldef%/*} ; then
|
||||||
mkdir -p ${md5_ldef%/*}
|
mkdir -p ${md5_ldef%/*}
|
||||||
fi
|
fi
|
||||||
if test -e ${md5_llua} -a -r ${md5_llua} ; then
|
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"
|
set -- $(cat ${md5_llua}) ; omd5llua="$1"
|
||||||
elif test ! -d ${md5_llua%/*} ; then
|
elif test ! -d ${md5_llua%/*} ; then
|
||||||
mkdir -p ${md5_llua%/*}
|
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
|
# 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" \)
|
while read format engine language rest
|
||||||
then
|
do
|
||||||
> /var/run/texlive/run-fmtutil.language
|
line=($rest)
|
||||||
fi
|
last=${line[-1]}
|
||||||
if test $omd5ldef = 0 -o \( $md5ldef != $omd5ldef -o "$md5_nt_ldef" != "yes" \)
|
inifile=${last#\*}
|
||||||
then
|
case "$engine" in
|
||||||
> /var/run/texlive/run-fmtutil.language
|
mpost) continue ;;
|
||||||
fi
|
mf|mfw|mf-nowin) continue ;;
|
||||||
if test $omd5llua = 0 -o \( $md5llua != $omd5llua -o "$md5_nt_llua" != "yes" \)
|
*) fmt="$format.fmt"; kpse=tex; engine=$engine ;;
|
||||||
then
|
esac
|
||||||
> /var/run/texlive/run-fmtutil.language
|
inifile=$(kpsewhich -progname=$format -format=$kpse $inifile 2>/dev/null) || continue
|
||||||
fi
|
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
|
fi
|
||||||
|
|
||||||
tcfmgr ()
|
tcfmgr ()
|
||||||
@ -347,13 +416,19 @@ for run in /var/run/texlive/run-fmtutil* ; do
|
|||||||
test $VERBOSE = true && echo
|
test $VERBOSE = true && echo
|
||||||
((rc != 0)) || rm -f /var/run/texlive/run-fmtutil.refresh
|
((rc != 0)) || rm -f /var/run/texlive/run-fmtutil.refresh
|
||||||
;;
|
;;
|
||||||
*)
|
"")
|
||||||
test $VERBOSE = true && echo -en "\r[ ]Updating TeX formats."
|
test $VERBOSE = true && echo -en "\r[ ]Updating TeX formats."
|
||||||
fmtutil-sys ${option:+$option} --missing < /dev/null 1>&4 2>&4
|
fmtutil-sys ${option:+$option} --missing < /dev/null 1>&4 2>&4
|
||||||
let rc+=$?
|
let rc+=$?
|
||||||
test $VERBOSE = true && echo
|
test $VERBOSE = true && echo
|
||||||
((rc != 0)) || rm -f /var/run/texlive/run-fmtutil
|
((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
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -451,22 +526,6 @@ fi
|
|||||||
# of various programs.
|
# of various programs.
|
||||||
#
|
#
|
||||||
type -p texconfig-sys &> /dev/null || exit 0
|
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
|
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."
|
||||||
updmap-sys --cnffile $cnf_umap --syncwithtrees < /dev/null 1>&4 2>&4
|
updmap-sys --cnffile $cnf_umap --syncwithtrees < /dev/null 1>&4 2>&4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user