Bug#531595: [tex-live] Supporting old releases: Using LaTeX after more than 5 years
Hi Karl, hi all,
together with Frank we have developped a patch for fmtutil that deals
with the following problem:
On So, 07 Jun 2009, Frank Küster wrote:
> Now if we look more closely, it turns out that LaTeX issues only a
> *warning* if you read the text. However, the lines are prepended with
> "! ", and therefore are treated as errors by fmtutil. In other words,
> the LaTeX format can be built fine even after 5 years have passed. But
> fmtutil won't accept it as cleanly built.
The idea is that *if* a fmt file was generated and the string
'! '
(without ') are found at the beginning of a line then this was only a
*warning* and no error.
Currently fmtutil does in this case:
log_failure "pdftex -ini ... possibly failed."
and log_failure triggers and return value of > 0, which turns out as
error.
We have changed fmtutil by adding a new logging facility
log_warning
(all paralleling log_failure) that is used instead. Messages generated
from this will not change the exit value, but will be reported at the
end.
I attach the patch against current TeX Live's fmtutil in
Build/source/texk/tetex/fmtutil.
Please comment, esp. if you (I am having my Debian hat on) will accept
that patch into the upstream source.
Thanks a lot
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining <preining@logic.at> Vienna University of Technology
Debian Developer <preining@debian.org> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
HUCKNALL (vb.)
To crouch upwards: as in the movement of a seated person's feet and
legs made in order to allow a cleaner's hoover to pass beneath them.
--- Douglas Adams, The Meaning of Liff
Index: fmtutil
===================================================================
--- fmtutil (revision 13706)
+++ fmtutil (working copy)
@@ -259,6 +259,23 @@
###############################################################################
byebye()
{
+ if $has_warnings; then
+ {
+ cat <<eof
+
+###############################################################################
+$progname: Warning! Some warnings have been issued.
+Visit the log files in directory
+ $destdir
+for details.
+###############################################################################
+
+This is a summary of all \`warning' messages:
+$log_warning_msg
+eof
+ } >&2
+ fi
+
if $has_errors; then
{
cat <<eof
@@ -270,7 +287,7 @@
for details.
###############################################################################
-This is a summary of all \`failed' messages and warnings:
+This is a summary of all \`failed' messages:
$log_failure_msg
eof
} >&2
@@ -281,6 +298,16 @@
}
###############################################################################
+# init_log_warning()
+# reset the list of warning messages
+###############################################################################
+init_log_warning()
+{
+ log_warning_msg=
+ has_warnings=false
+}
+
+###############################################################################
# init_log_failure()
# reset the list of failure messages
###############################################################################
@@ -291,6 +318,24 @@
}
###############################################################################
+# log_warning(errmsg)
+# report and save warning message `errmsg'
+###############################################################################
+log_warning()
+{
+ echo "Warning: $@" >&2
+ if test -z "$log_warning_msg"; then
+ log_warning_msg="$@"
+ else
+ OLDIFS=$IFS; IFS=
+ log_warning_msg="$log_warning_msg
+$@"
+ IFS=$OLDIFS
+ fi
+ has_warnings=true
+}
+
+###############################################################################
# log_failure(errmsg)
# report and save failure message `errmsg'
###############################################################################
@@ -547,6 +592,7 @@
cache_vars
init_log_failure
+ init_log_warning
# execute the desired command:
case "$cmd" in
all)
@@ -706,7 +752,7 @@
mkdir -p "$fulldestdir"
if test -f $fmtfile; then
grep '^! ' $format.log >/dev/null 2>&1 &&
- log_failure "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' possibly failed."
+ log_warning "\`$engine -ini $tcxflag $jobswitch $prgswitch $texargs' possibly failed."
# We don't want user-interaction for the following "mv" commands:
mv "$format.log" "$fulldestdir/$format.log" </dev/null
Reply to: