[PATCH -perfbook 6/8] precheck-tentative.sh: Fail early with suggestions for Fedora 44
Akira Yokosawa <[email protected]> Wed, 6 May 2026 20:45:06 +0900
| Newsgroups | org.kernel.vger.perfbook |
|---|---|
| Message-ID | <[email protected]> |
Here is an example of aborting message you will see under Fedora 44 from
simple "make":
#### array.sty requires a later release of LaTeX2e. ####
#### arary.sty requires LaTeX2e <2026-06-01>, ####
#### while your LaTeX2e is <2025-11-01>. ####
#### Check your TeX Live installation. (Known issue under Fedora 44).
#### 1st option is to downgrade array.sty to v2.6n.
#### 2nd option is to install texlive-latex-base-dev and
#### say 'make LATEX=pdflatex-dev'.
#### As a last resort, 'make WARNEXIT=0' would ignore such 'LaTeX Warning:'
#### messages and complete iteration of latex runs (if you are lucky).
make: *** [Makefile:300: perfbook.aux] Error 1
Signed-off-by: Akira Yokosawa <[email protected]>
---
utilities/precheck-tentative.sh | 40 +++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/utilities/precheck-tentative.sh b/utilities/precheck-tentative.sh
index 8b53e02c..96d2fe2f 100755
--- a/utilities/precheck-tentative.sh
+++ b/utilities/precheck-tentative.sh
@@ -5,6 +5,8 @@
#
# Copyright (C) Akira Yokosawa, 2026
+: ${WARNEXIT:=1}
+
KPSEWHICH=`command -v kpsewhich`
if [ "$KPSEWHICH" != "" ] ; then
@@ -63,4 +65,42 @@ if [ "$hyperrefsince" = "$HYPERREF_SINCE" ] ; then # older
fi
fi
+#### Tentative check of packaging inconsistency in Fedora 44 #############
+# latex-base vs array (provided in texlive-tools)
+
+latex_release_dev=`kpsewhich latex-dev/base/latexrelease.sty`
+
+if [ "$latex_release_dev" != "" ] ; then
+ latex_dev_ver=`grep -F -A1 -e '\edef\latexreleaseversion' $latex_release_dev | \
+ grep -F '{' | \
+ sed -E -e 's/[ ]+\{([0-9\-]+)\}/<\1>/' -e 's/\//\-/g'`
+fi
+
+array_sty=`kpsewhich array.sty`
+array_req_ver=`grep -F -e '\NeedsTeXFormat{LaTeX2e}' $array_sty | \
+ tail -n 1 | \
+ sed -e 's/\\\\NeedsTeXFormat{LaTeX2e}//' | \
+ sed -E -e 's/\[/</' -e 's/\]/>/' -e 's/\//\-/g'`
+
+if [ "$LATEX" != "pdflatex-dev" ] ; then
+ if [ "$array_req_ver" \> "$latex_ver" -a "$WARNEXIT" = "1" ] ; then
+ echo "#### array.sty requires a later release of LaTeX2e. ####"
+ echo "#### arary.sty requires LaTeX2e $array_req_ver, ####"
+ echo "#### while your LaTeX2e is $latex_ver. ####"
+ echo "#### Check your TeX Live installation. (Known issue under Fedora 44.)"
+ echo "#### 1st option is to downgrade array.sty to v2.6n."
+ echo "#### 2nd option is to install texlive-latex-base-dev and"
+ echo "#### say 'make LATEX=pdflatex-dev'."
+ echo "#### As a last resort, 'make WARNEXIT=0' would ignore such 'LaTeX Warning:'"
+ echo "#### messages and complete iteration of latex runs (if you are lucky)."
+ exit 1
+ fi
+else
+ if [ "$latex_dev_ver" = "" ] ; then
+ echo "#### LaTeX2e (-dev) is not found! ####"
+ echo "#### You need to install texlive-latex-base-dev. ####"
+ exit 1
+ fi
+fi
+
fi #KPSEWHICH
--
2.43.0