precheck-tentative.sh: Make array.sty probing fail-fast and deterministic
PATCH 1/1 precheck-tentative.sh: Make array.sty probing fail-fast and deterministic
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").
--- utilities/precheck-tentative.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
utilities/precheck-tentative.sh +14 -5
@@ -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."
Signature · 1 line
2.25.1
Hi,
Quoted 12 lines · 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_veragainstlatex_verin 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_veronly when the file exists, fail fast with a clear diagnostic when it does not, and correct the warning text typo ("arary.sty" -> "array.sty").
Quoted 7 lines
Fixes 4cad3dd1174a ("precheck-tentative.sh: Fail early with suggestions for Fedora 44")Signed-off-by Kunwu Chan <[email protected]>--- 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!
Regerds, Akira
Quoted 2 lines
utilities/precheck-tentative.sh +0
-0
[...]
Paul E. McKenney
AppliedQuoted 23 lines · Akira Yokosawa
Hi,
Quoted 12 lines · 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_veragainstlatex_verin 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_veronly when the file exists, fail fast with a clear diagnostic when it does not, and correct the warning text typo ("arary.sty" -> "array.sty").Quoted 7 lines
Fixes 4cad3dd1174a ("precheck-tentative.sh: Fail early with suggestions for Fedora 44")Signed-off-by Kunwu Chan <[email protected]>--- utilities/precheck-tentative.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
Quoted 5 lines
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
Quoted 5 lines
Regerds, Akira
Quoted 2 lines
utilities/precheck-tentative.sh +0
-0[...]