[jhalfs] 01/02: Output preceding linefeed only for <screen>

"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]> Sat, 04 Jan 2025 11:37:10 +0000
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 f531281c405b2c88287ba8e718fcccd7654fdeed
Author: Pierre Labastie <[email protected]>
AuthorDate: Sat Jan 4 12:29:04 2025 +0100

    Output preceding linefeed only for <screen>
    
    See ticket #1743 for details. Because of the book layout, it is
    necessary to output a linefeed between two blocks of commands.
    Previously, this was done before each <userinput> tag. This
    is wrong, since <userinput> can occur several times inside
    a block. We now only output linefeed before <screen> or
    before <command> when that one contains a test instruction.
    
    Fixes #1743
---
 BLFS/xsl/process-install.xsl |  8 ++++++--
 BLFS/xsl/scripts.xsl         | 14 +++++++++++---
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/BLFS/xsl/process-install.xsl b/BLFS/xsl/process-install.xsl
index 1f15028..eff6a21 100644
--- a/BLFS/xsl/process-install.xsl
+++ b/BLFS/xsl/process-install.xsl
@@ -192,7 +192,7 @@
               <xsl:text>
 echo Time before install: ${SECONDS} >> $INFOLOG</xsl:text>
               <xsl:apply-templates
-                         select="$instruction-tree[@role='root']/userinput"
+                         select="$instruction-tree[@role='root']"
                          mode="destdir"/>
               <xsl:text>
 
@@ -345,9 +345,13 @@ echo Size after install: $(sudo du -skx --exclude home $BUILD_DIR) >> $INFOLOG
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template match="userinput" mode="install">
+  <xsl:template match="screen" mode="install">
     <xsl:text>
 </xsl:text>
+    <xsl:apply-templates mode="install"/>
+  </xsl:template>
+
+  <xsl:template match="userinput" mode="install">
     <xsl:call-template name="output-install">
       <xsl:with-param name="out-string" select="string()"/>
     </xsl:call-template>
diff --git a/BLFS/xsl/scripts.xsl b/BLFS/xsl/scripts.xsl
index 6c2997c..b5a6fa5 100644
--- a/BLFS/xsl/scripts.xsl
+++ b/BLFS/xsl/scripts.xsl
@@ -662,6 +662,8 @@ EOF
         <xsl:if test="not(preceding-sibling::screen[1][@role='root'])">
           <xsl:call-template name="begin-root"/>
         </xsl:if>
+        <xsl:text>
+</xsl:text>
         <xsl:apply-templates mode="root"/>
         <xsl:if test="not(following-sibling::screen[1][@role='root'])">
           <xsl:call-template name="end-root"/>
@@ -669,6 +671,8 @@ EOF
       </xsl:when>
 <!-- then all the instructions run as user -->
       <xsl:otherwise>
+        <xsl:text>
+</xsl:text>
         <xsl:apply-templates select="userinput"/>
       </xsl:otherwise>
     </xsl:choose>
@@ -844,13 +848,13 @@ echo Time before install: ${SECONDS} >> $INFOLOG
         </xsl:if>
   </xsl:template>
 
-  <xsl:template match="userinput|command">
+  <xsl:template match="command">
     <xsl:text>
 </xsl:text>
     <xsl:apply-templates/>
   </xsl:template>
 
-  <xsl:template match="userinput" mode="root">
+  <xsl:template match="screen" mode="root">
     <xsl:text>
 </xsl:text>
     <xsl:apply-templates mode="root"/>
@@ -924,9 +928,13 @@ echo Size after install: $(sudo du -skx --exclude home $BUILD_DIR) >> $INFOLOG
 </xsl:text>
   </xsl:template>
 
-  <xsl:template match="userinput" mode="destdir">
+  <xsl:template match="screen" mode="destdir">
     <xsl:text>
 </xsl:text>
+    <xsl:apply-templates mode="destdir"/>
+  </xsl:template>
+
+  <xsl:template match="userinput" mode="destdir">
     <xsl:for-each select="./literal">
       <xsl:call-template name="outputpkgdest">
         <xsl:with-param name="outputstring" select="preceding-sibling::text()[1]"/>

-- 
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