From 837362b50f15546911c34fa39ceac88bf005d403 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Mon, 13 Dec 2021 16:05:39 +0100 Subject: [PATCH] Ticket #1732: add Docbook XSL and XML to check_alfs_tools This is an oversight of when we moved to profiling and when we removed the docbook xsl stylesheets from the LFS directory. Docbook XML DTD and XSL stylesheets are needed, so test them at start. This has the effect of removing the need for check_blfs_tools. --- common/libs/func_check_version.sh | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/common/libs/func_check_version.sh b/common/libs/func_check_version.sh index 7e0fdc2..a610a17 100644 --- a/common/libs/func_check_version.sh +++ b/common/libs/func_check_version.sh @@ -227,23 +227,12 @@ inline_doc echo "${nl_}\"${RED}xsltproc${OFF}\" ${BOLD}must be installed on your system for jhalfs to run" exit 1 fi -} - -#----------------------------# -check_blfs_tools() { # -#----------------------------# -: << inline_doc -In addition to the tools needed for the LFS part, docbook-xml -is needed for installing the BLFS tools -inline_doc - - # Avoid translation of version strings - local LC_ALL=C - export LC_ALL + # Now that we do profiling, we need the docbook DTD, and the docbook XSL + # stylesheets. # Minimal docbook-xml code for testing XML_FILE=" - +
@@ -254,10 +243,17 @@ inline_doc
" - if `echo $XML_FILE | xmllint -nonet -noout -postvalid - 2>/dev/null` ; then + if echo $XML_FILE | xmllint -nonet -noout -postvalid - 2>/dev/null ; then check_version "4.5" "4.5" "DocBook XML DTD" else - echo "Error: you need the Docbook XML DTD for installing BLFS tools" - exit 2 + echo "Error: you need the Docbook XML DTD for running jhalfs" + exit 1 + fi + + if echo $XML_FILE | xsltproc -nonet -noout - 2>/dev/null ; then + check_version "current" "current" "DocBook XSL stylesheets" + else + echo "Error: you need the Docbook XSL stylesheets for running jhalfs" + exit 1 fi }