* [PATCH] precheck-tentative.sh: Make array.sty probing fail-fast and deterministic
@ 2026-05-07 9:50 Kunwu Chan
2026-05-07 10:37 ` Akira Yokosawa
0 siblings, 1 reply; 3+ messages in thread
From: Kunwu Chan @ 2026-05-07 9:50 UTC (permalink / raw)
To: perfbook; +Cc: Kunwu Chan, Kunwu Chan
On systems where kpsewhich cannot resolve array.sty, the script fed an
empty path into the version-parsing pipeline and then compared an empty
array_req_ver against latex_ver in the non-pdflatex-dev path. The
result depended on environment and produced no actionable error.
This is reproducible by overriding kpsewhich to return nothing for
array.sty while keeping other lookups intact.
Add a guard before parsing array.sty, set array_req_ver only when the
file exists, fail fast with a clear diagnostic when it does not, and
correct the warning text typo ("arary.sty" -> "array.sty").
Fixes: 4cad3dd1174a ("precheck-tentative.sh: Fail early with suggestions for Fedora 44")
Signed-off-by: Kunwu Chan <kunwu.chan@gmail.com>
---
utilities/precheck-tentative.sh | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/utilities/precheck-tentative.sh b/utilities/precheck-tentative.sh
index 96d2fe2f..1e106877 100755
--- a/utilities/precheck-tentative.sh
+++ b/utilities/precheck-tentative.sh
@@ -77,15 +77,24 @@ if [ "$latex_release_dev" != "" ] ; then
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 [ "$array_sty" != "" ] ; then
+ 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'`
+else
+ array_req_ver=""
+fi
if [ "$LATEX" != "pdflatex-dev" ] ; then
+ if [ "$array_req_ver" = "" ] ; then
+ echo "array.sty is not found!"
+ echo "Check your TeX Live installation."
+ exit 1
+ fi
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 "#### array.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."
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] precheck-tentative.sh: Make array.sty probing fail-fast and deterministic
2026-05-07 9:50 [PATCH] precheck-tentative.sh: Make array.sty probing fail-fast and deterministic Kunwu Chan
@ 2026-05-07 10:37 ` Akira Yokosawa
2026-05-07 17:52 ` Paul E. McKenney
0 siblings, 1 reply; 3+ messages in thread
From: Akira Yokosawa @ 2026-05-07 10:37 UTC (permalink / raw)
To: Kunwu Chan; +Cc: Kunwu Chan, perfbook, Paul E. McKenney
Hi,
On Thu, 7 May 2026 17:50:11 +0800, Kunwu Chan wrote:
> On systems where kpsewhich cannot resolve array.sty, the script fed an
> empty path into the version-parsing pipeline and then compared an empty
> array_req_ver against latex_ver in the non-pdflatex-dev path. The
> result depended on environment and produced no actionable error.
>
> This is reproducible by overriding kpsewhich to return nothing for
> array.sty while keeping other lookups intact.
>
> Add a guard before parsing array.sty, set array_req_ver only when the
> file exists, fail fast with a clear diagnostic when it does not, and
> correct the warning text typo ("arary.sty" -> "array.sty").
>
> Fixes: 4cad3dd1174a ("precheck-tentative.sh: Fail early with suggestions for Fedora 44")
>
> Signed-off-by: Kunwu Chan <kunwu.chan@gmail.com>
> ---
> utilities/precheck-tentative.sh | 19 ++++++++++++++-----
> 1 file changed, 14 insertions(+), 5 deletions(-)
>
I didn't think of running "make" before installing texlive-tools bundle.
That said, this can be helpful in setting up brand new installations.
And thanks for the typo fix!
Acked-by: Akira Yokosawa
Regerds, Akira
> diff --git a/utilities/precheck-tentative.sh b/utilities/precheck-tentative.sh
> index 96d2fe2f..1e106877 100755
[...]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] precheck-tentative.sh: Make array.sty probing fail-fast and deterministic
2026-05-07 10:37 ` Akira Yokosawa
@ 2026-05-07 17:52 ` Paul E. McKenney
0 siblings, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2026-05-07 17:52 UTC (permalink / raw)
To: Akira Yokosawa; +Cc: Kunwu Chan, Kunwu Chan, perfbook
On Thu, May 07, 2026 at 07:37:48PM +0900, Akira Yokosawa wrote:
> Hi,
>
> On Thu, 7 May 2026 17:50:11 +0800, Kunwu Chan wrote:
> > On systems where kpsewhich cannot resolve array.sty, the script fed an
> > empty path into the version-parsing pipeline and then compared an empty
> > array_req_ver against latex_ver in the non-pdflatex-dev path. The
> > result depended on environment and produced no actionable error.
> >
> > This is reproducible by overriding kpsewhich to return nothing for
> > array.sty while keeping other lookups intact.
> >
> > Add a guard before parsing array.sty, set array_req_ver only when the
> > file exists, fail fast with a clear diagnostic when it does not, and
> > correct the warning text typo ("arary.sty" -> "array.sty").
> >
> > Fixes: 4cad3dd1174a ("precheck-tentative.sh: Fail early with suggestions for Fedora 44")
> >
> > Signed-off-by: Kunwu Chan <kunwu.chan@gmail.com>
> > ---
> > utilities/precheck-tentative.sh | 19 ++++++++++++++-----
> > 1 file changed, 14 insertions(+), 5 deletions(-)
> >
>
> I didn't think of running "make" before installing texlive-tools bundle.
> That said, this can be helpful in setting up brand new installations.
> And thanks for the typo fix!
>
> Acked-by: Akira Yokosawa
Queued and pushed, thank you both!
Thanx, Paul
> Regerds, Akira
>
> > diff --git a/utilities/precheck-tentative.sh b/utilities/precheck-tentative.sh
> > index 96d2fe2f..1e106877 100755
> [...]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-07 17:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07 9:50 [PATCH] precheck-tentative.sh: Make array.sty probing fail-fast and deterministic Kunwu Chan
2026-05-07 10:37 ` Akira Yokosawa
2026-05-07 17:52 ` Paul E. McKenney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox