Add detection of changes in configuration files as well as handle linked engines

OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive-filesystem?expand=0&rev=138
This commit is contained in:
Dr. Werner Fink 2020-10-02 07:42:34 +00:00 committed by Git OBS Bridge
parent b0f8011426
commit cd61fbd363
2 changed files with 52 additions and 0 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Oct 2 07:39:05 UTC 2020 - Dr. Werner Fink <werner@suse.de>
- Enhance update script to detect user changes in configuration
files to warn the user. Also run texlinks script to be sure
that local configuration fits the linked engines (boo#1176557)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Apr 28 06:46:38 UTC 2020 - Dr. Werner Fink <werner@suse.de> Tue Apr 28 06:46:38 UTC 2020 - Dr. Werner Fink <werner@suse.de>

View File

@ -120,6 +120,8 @@ unset KPSE_DOT || true
: ${TEXMFDIST:=$(kpsewhich --expand-path='$TEXMFDIST' 2> /dev/null)} : ${TEXMFDIST:=$(kpsewhich --expand-path='$TEXMFDIST' 2> /dev/null)}
: ${TEXMFVAR:=$(kpsewhich --var-value=TEXMFVAR 2> /dev/null)} : ${TEXMFVAR:=$(kpsewhich --var-value=TEXMFVAR 2> /dev/null)}
: ${TEXMFCNFFILE:=$(kpsewhich texmf.cnf 2> /dev/null)} : ${TEXMFCNFFILE:=$(kpsewhich texmf.cnf 2> /dev/null)}
: ${FMTUTILCNFFILE:=$(kpsewhich fmtutil.cnf 2> /dev/null)}
: ${TEXLUACNFFILE:=$(kpsewhich -format=web2c texmfcnf.lua 2> /dev/null)}
: ${TEXMFSYSCONFIG:=$(kpsewhich --expand-path='$TEXMFSYSCONFIG' 2> /dev/null)} : ${TEXMFSYSCONFIG:=$(kpsewhich --expand-path='$TEXMFSYSCONFIG' 2> /dev/null)}
: ${TEXMFLSR:=$(kpsewhich --show-path=ls-R 2> /dev/null)} : ${TEXMFLSR:=$(kpsewhich --show-path=ls-R 2> /dev/null)}
: ${WEB2C:=$TEXMFVAR/web2c} : ${WEB2C:=$TEXMFVAR/web2c}
@ -133,6 +135,39 @@ if test ! -e "$TEXMFCNFFILE" ; then
exit 0 exit 0
fi fi
#
# Check for old configurations and inform system admin to check those
#
typeset -i mail=0
typeset -a list=()
for cnf in ${TEXMFCNFFILE} ${FMTUTILCNFFILE} ${TEXLUACNFFILE}
do
test -e ${cnf}.rpmnew || continue
list[mail++]=${cnf}
done
if ((mail > 0))
then
mailx -s "TeXLive Update: Warning about changed configurations" root@localhost <<-EOF
Hello,
the update script has found one or more changed configuration files:
$(for cnf in ${list[@]}; do echo " ${cnf}"; done)
Please (if required) port the changes to the files with suffix .rpmnew!
Always move those rpmnew files to the original location:
$(for cnf in ${list[@]}; do echo " mv ${cnf}.rpmnew ${cnf}"; done)
afterwards run as root:
/usr/share/texmf/texconfig/update force
to get your configuration work again.
EOF
fi
unset mail list cnf
# #
# Check for scriplets # Check for scriplets
# #
@ -193,6 +228,16 @@ do
done done
unset hyp suffix unset hyp suffix
#
# Be sure that the TeX Links do fit the configuration in fmtutil.cnf
#
if type -p texlinks &> /dev/null
then
test $VERBOSE = true && { echo -en "\r[ ]Updating TeX links"; let nl++; }
texlinks < /dev/null 1>&4 2>&4
((nl == 0)) || { echo; let nl=0; }
fi
init=false init=false
typeset -i yes=0 typeset -i yes=0
while read format engine language rest while read format engine language rest