[jhalfs] 02/04: Ticket #1732: add Docbook XSL and XML to check_alfs_tools

"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.automated
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch trunk
in repository jhalfs.

commit 837362b50f15546911c34fa39ceac88bf005d403
Author: Pierre Labastie <[email protected]>
AuthorDate: Mon Dec 13 16:05:39 2021 +0100

    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="<?xml version='1.0' encoding='ISO-8859-1'?>
-<?xml-stylesheet type='text/xsl' href='http://docbook.sourceforge.net/release/xsl/1.69.1/xhtml/docbook.xsl'?>
+<?xml-stylesheet type='text/xsl' href='http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl'?>
 <!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN'
   'http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd'>
 <article>
@@ -254,10 +243,17 @@ inline_doc
   </sect1>
 </article>"
 
-  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
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/alfs-discuss
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.