[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo-tex-4.13a: texi2dvi fails to diagnose error
From: |
Jim Meyering |
Subject: |
texinfo-tex-4.13a: texi2dvi fails to diagnose error |
Date: |
Wed, 09 Nov 2011 20:43:08 +0100 |
Hi,
I'm using texinfo-tex-4.13a-15.fc15.x86_64's texi2dvi.
I was surprised to find that texi2dvi was failing with no diagnostic.
I invoked it like this, with a copy of the latest texinfo.tex
from gnulib in the current directory:
$ echo '\input texinfo.tex @bye' > k.tex && texi2dvi k.tex
[Exit 1]
That's happening because the set -e in texi2dvi is making the
failed $TEX invocation evoke immediate exit:
(
cd "$version_test_dir"
echo '\input texinfo.tex @bye' >txiversion.tex
# Be sure that if tex wants to fail, it is not interactive:
# close stdin.
$TEX txiversion.tex </dev/null >txiversion.out 2>txiversion.err || :
)
While the code that follows obviously expects to diagnose it
when $TEX fails:
if test $? != 0; then
cat "$version_test_dir/txiversion.out"
cat "$version_test_dir/txiversion.err" >&2
error 1 "texinfo.tex appears to be broken, quitting."
fi
Here's the diagnostic that should have been printed:
$ echo '\input texinfo.tex @bye' > k.tex && etex k.tex
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
%&-line parsing enabled.
entering extended mode
(./k.tex (./texinfo.tex Loading texinfo [version 2011-11-09.20]: pdf, fonts,
markup, glyphs,
! Undefined control sequence.
l.2995 ...box{\kern-.75pt \reducedsf \putworderror
\kern-1.5pt}
?
! Emergency stop.
l.2995 ...box{\kern-.75pt \reducedsf \putworderror
\kern-1.5pt}
No pages of output.
Transcript written on k.log.
That use of \putworderror just happens to be related to the latest
change that made it to gnulib:
http://git.sv.gnu.org/cgit/gnulib.git/commit/?id=b18034f02dc847ab
Regarding the bug whereby texi2dvi fails to diagnose the
problem, you might want to make this change, assuming
the effects of "set +e" are local to that sub-shell.
If not, or maybe just to be safe, also add "set -e" right
after the ")":
--- texi2dvi 2011-02-09 20:00:17.000000000 +0100
+++ texi2dvi 2011-11-09 20:38:45.043064827 +0100
@@ -1196,6 +1196,7 @@ run_makeinfo ()
echo '\input texinfo.tex @bye' >txiversion.tex
# Be sure that if tex wants to fail, it is not interactive:
# close stdin.
+ set +e
$TEX txiversion.tex </dev/null >txiversion.out 2>txiversion.err
)
if test $? != 0; then
- texinfo-tex-4.13a: texi2dvi fails to diagnose error,
Jim Meyering <=