forked from pool/texlive-filesystem
Accepting request 221588 from Publishing:TeXLive
- Avoid that missing formats for a hyphen file will cause high load at installation OBS-URL: https://build.opensuse.org/request/show/221588 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/texlive-filesystem?expand=0&rev=11
This commit is contained in:
commit
f86d685ce6
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 10 10:03:46 UTC 2014 - werner@suse.de
|
||||
|
||||
- Avoid that missing formats for a hyphen file will cause high
|
||||
load at installation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 7 09:57:30 UTC 2013 - werner@suse.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package texlive-filesystem
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
|
@ -111,6 +111,7 @@ test -L "$TEXMFCNFFILE" && TEXMFCNFFILE="$(readlink -f "$TEXMFCNFFILE" 2> /dev/n
|
||||
#
|
||||
cnf_ldat=$(TEXMF=$TEXMFSYSCONFIG kpsewhich language.dat 2> /dev/null)
|
||||
cnf_ldef=$(TEXMF=$TEXMFSYSCONFIG kpsewhich language.def 2> /dev/null)
|
||||
cnf_fmtu=$(TEXMF=$TEXMFSYSCONFIG kpsewhich fmtutil.cnf 2> /dev/null)
|
||||
|
||||
if test -n "${cnf_ldat}" -a -n "${cnf_ldef}" ; then
|
||||
for cfg in ${cnf_ldat} ${cnf_ldef} ; do
|
||||
@ -187,6 +188,33 @@ enablemaps ()
|
||||
return $rc
|
||||
}
|
||||
|
||||
|
||||
has_formats()
|
||||
{
|
||||
local hyphen
|
||||
local OIFS="$IFS"
|
||||
local IFS=$'\n'
|
||||
|
||||
local -a list=($(sed -r '/^#/d; /^[[:blank:]]*$/d' $cnf_fmtu))
|
||||
local -a line
|
||||
IFS="$OIFS"
|
||||
|
||||
local -i count=${#list[@]}
|
||||
local -i last
|
||||
|
||||
while ((count-- > 0)) ; do
|
||||
line=(${list[count]})
|
||||
test ${line[2]} = "-" && continue
|
||||
let last=${#line[@]}
|
||||
let last--
|
||||
kpsewhich -progname=${line[0]} -format=tex ${line[last]#\*} &>/dev/null || continue
|
||||
hyphen=$(kpsewhich -progname=${line[0]} -format=tex ${line[2]} 2>/dev/null)
|
||||
test -n "$hyphen" -a -e "$hyphen" -a "$hyphen" = "$1" || continue
|
||||
return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
#
|
||||
# Go further
|
||||
#
|
||||
@ -202,14 +230,18 @@ for run in /var/run/texlive/run-fmtutil* ; do
|
||||
echo $1 > ${md5_ldat}
|
||||
set -- $(md5sum < ${cnf_ldef})
|
||||
echo $1 > ${md5_ldef}
|
||||
test $VERBOSE = true && echo -en "\r[ ]Handle language.dat setups."
|
||||
fmtutil-sys ${option:+$option} --byhyphen ${cnf_ldat} < /dev/null 1>&4 2>&4
|
||||
let rc+=$?
|
||||
test $VERBOSE = true && echo
|
||||
test $VERBOSE = true && echo -en "\r[ ]Handle language.def setups."
|
||||
fmtutil-sys ${option:+$option} --byhyphen ${cnf_ldef} < /dev/null 1>&4 2>&4
|
||||
let rc+=$?
|
||||
test $VERBOSE = true && echo
|
||||
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
|
||||
let rc+=$?
|
||||
test $VERBOSE = true && echo
|
||||
fi
|
||||
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
|
||||
let rc+=$?
|
||||
test $VERBOSE = true && echo
|
||||
fi
|
||||
((rc != 0)) || rm -f /var/run/texlive/run-fmtutil.language
|
||||
;;
|
||||
refresh)
|
||||
|
Loading…
x
Reference in New Issue
Block a user