[PATCH -perfbook 5/8] runlatex.sh: Add WARNEXIT variable to make "LaTeX Warning:" in .log be ignored
Akira Yokosawa <[email protected]> Wed, 6 May 2026 20:44:06 +0900
| Newsgroups | org.kernel.vger.perfbook |
|---|---|
| Message-ID | <[email protected]> |
In testing Fedora 44's TeX Live packages, a warning in .log files
caused build failures with this message:
LaTeX Warning: You have requested release `2026/06/01' of LaTeX,
but only release `2025-11-01' is available.
Package: array 2026/01/25 v2.7a Tabular extension package (FMi)
\col@sep=\dimen149
### Incompatible package(s) detected. See perfbook.log for details. ###
The root cause of this is mismatching LaTeXe2 and array.sty versions
contained in Fedora 44's texlive-base and texlive-tools packages.
This was reported at Fedora bugzilla [1], without getting much
attention of its maintainer.
As a tentative measure, add a fall-through mode in runlatex.sh which
can be enabled by saying:
make WARNEXIT=0
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2447682 [1]
Signed-off-by: Akira Yokosawa <[email protected]>
---
utilities/runfirstlatex.sh | 6 +++++-
utilities/runlatex.sh | 18 +++++++++++++++---
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/utilities/runfirstlatex.sh b/utilities/runfirstlatex.sh
index 3fed1b69..269a3b62 100644
--- a/utilities/runfirstlatex.sh
+++ b/utilities/runfirstlatex.sh
@@ -68,6 +68,7 @@ fi
basename=`echo $1 | sed -e 's/\.tex$//'`
: ${LATEX:=pdflatex}
+: ${WARNEXIT:=1}
if iconv --list | grep -q -i iso-8859-1
then
@@ -94,7 +95,10 @@ then
grep -A 4 'LaTeX Warning: You have requested' $basename.log
echo "### Incompatible package(s) detected. See $basename.log for details. ###"
echo "### See items 9 and 10 in FAQ-BUILD.txt for how to update. ###"
- exit 1
+ if [ $WARNEXIT -eq 0 ] ; then
+ touch $basename-first.log
+ fi
+ exit $WARNEXIT
fi
if grep -q 'LaTeX Error:' $basename.log
then
diff --git a/utilities/runlatex.sh b/utilities/runlatex.sh
index e9689a99..50aec2f9 100644
--- a/utilities/runlatex.sh
+++ b/utilities/runlatex.sh
@@ -30,6 +30,9 @@
# Akira Yokosawa <[email protected]>
: ${LATEX:=pdflatex}
+: ${WARNEXIT:=1}
+
+WARN_REMAIN=0
if iconv --list | grep -q -i iso-8859-1
then
@@ -68,7 +71,10 @@ excerpt_warnings () {
echo "----- You can see $basename-warning.log for the warnings above. -----"
echo "----- If you need to, see $basename.log for details. -----"
rm -f $basename-warning-prev.log
- exit 1
+ WARN_REMAIN=1
+ if [ $WARNEXIT -ne 0 ] ; then
+ exit $WARNEXIT
+ fi
fi
}
@@ -169,8 +175,14 @@ do
iterate_latex
done
excerpt_warnings
-rm -f $basename-warning.log $basename-warning-prev.log
-echo "'$basename.pdf' is ready."
+if [ $WARNEXIT -ne 0 ] ; then
+ rm -f $basename-warning.log $basename-warning-prev.log
+fi
+if [ $WARN_REMAIN -eq 0 ] ; then
+ echo "'$basename.pdf' is ready."
+else
+ echo "'$basename.pdf' is ready, with above warning(s) ignored."
+fi
# cleveref version check (Ubuntu 18.04 LTS has buggy one
if grep -q -F "packageversion{0.21.1}" `kpsewhich cleveref.sty`
then
--
2.43.0