Bug#249597: texmf: Leaves spurious tempfiles around
On 25.05.04 Frank Küster (frank@debian.org) wrote:
Hi all,
> It's a little harder with the fmtutil call: Currently, we grep
> through the tempfile for the "I'm stymied" message, and run ftmutil
> again if we encounter it. So the code needs 5 minutes more of
> thinking (which I didn't have yet).
>
How about:
TEMPFILE=`tempfile -p tex`
echo "Running initex. This may take some time. ..."
$TEXINIT_P > $TEMPFILE
$TEXLINKS_P >> $TEMPFILE
flag=`grep stymied $TEMPFILE` || true
if [ X"$flag" != X ]; then
echo "#####"
echo "Failed to generate some FMT so try once again!"
echo "#####Failed to generate some FMT so try once again!" >> $TEMPFILE
if fmtutil --all >> $TEMPFILE; then
rm $TEMPFILE
else
echo; echo "Something went wrong. Output of initex is in $TEMPFILE."
echo "Please post the content when reporting a bug."
fi
else
rm $TEMPFILE
fi
Remarks: - Are there some other kinds of failing, beside having a
"stymied" string in the log file. Perhaps we should generally
checking the exit status of fmtutil instead of grep'ing for a string.
- The second rm can be fatal, if there there was no stymied string in
the log file, but fmtutil nevertheless failed.
H.
--
sigmentation fault
Reply to: