| Newsgroups |
gmane.linux.lfs.automated |
| Message-ID |
<167917597796.10326.3436616001759738990@rivendell.linuxfromscratch.org> |
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch trunk
in repository jhalfs.
The following commit(s) were added to refs/heads/trunk by this push:
new 24ad4fd Fix outputting too many sh <<ROOT_EOF
24ad4fd is described below
commit 24ad4fd4f4119781b39eace0d0be78250f7de530
Author: Pierre Labastie <[email protected]>
AuthorDate: Sat Mar 18 22:44:03 2023 +0100
Fix outputting too many sh <<ROOT_EOF
When installing a bootscript or a unit, this sometimes happen
(e.g. samba).
---
BLFS/xsl/scripts.xsl | 34 +++++++++++++++++++++++-----------
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/BLFS/xsl/scripts.xsl b/BLFS/xsl/scripts.xsl
index cb0cc70..eb04609 100644
--- a/BLFS/xsl/scripts.xsl
+++ b/BLFS/xsl/scripts.xsl
@@ -722,9 +722,13 @@ cd $BOOTUNPACKDIR</xsl:text>
<xsl:template match="screen" mode="config">
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts']">
<!-- if the preceding "screen" tag is role="root", and we are role="root"
- the end-root has not been called. So do it -->
+ the end-root has not been called, except if the preceding "screen"
+ tag is itself preceded by a <para> containing and <xref> to
+ bootscripts. So close it only if needed -->
<xsl:if
- test="preceding-sibling::screen[1][@role='root'] and @role='root'">
+ test="preceding-sibling::screen[1][@role='root'] and
+ @role='root' and
+ not(preceding-sibling::screen[1]/preceding-sibling::para[1]/xref[@linkend='bootscripts'])">
<xsl:call-template name="end-root"/>
</xsl:if>
<xsl:call-template name="set-bootpkg-dir">
@@ -733,17 +737,21 @@ cd $BOOTUNPACKDIR</xsl:text>
select="id('bootscripts')//itemizedlist//ulink/@url"/>
</xsl:call-template>
<!-- if the preceding "screen" tag is role="root", and we are role="root"
- the begin-root will not be called. So do it -->
+ the begin-root will not be called. So do it.-->
<xsl:if
- test="preceding-sibling::screen[1][@role='root'] and @role='root'">
+ test="preceding-sibling::screen[1][@role='root'] and
+ @role='root'">
<xsl:call-template name="begin-root"/>
</xsl:if>
</xsl:if>
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='systemd-units']">
<!-- if the preceding "screen" tag is role="root", and we are role="root"
- the end-root has not been called. So do it -->
+ the end-root has not been called. So do it, except if it was already a
+ unit install -->
<xsl:if
- test="preceding-sibling::screen[1][@role='root'] and @role='root'">
+ test="preceding-sibling::screen[1][@role='root'] and
+ @role='root' and
+ not(preceding-sibling::screen[1]/preceding-sibling::para[1]/xref[@linkend='systemd-units'])">
<xsl:call-template name="end-root"/>
</xsl:if>
<xsl:call-template name="set-bootpkg-dir">
@@ -752,9 +760,10 @@ cd $BOOTUNPACKDIR</xsl:text>
select="id('systemd-units')//itemizedlist//ulink/@url"/>
</xsl:call-template>
<!-- if the preceding "screen" tag is role="root", and we are role="root"
- the begin-root will not be called. So do it -->
+ the begin-root will not be called. So do it. -->
<xsl:if
- test="preceding-sibling::screen[1][@role='root'] and @role='root'">
+ test="preceding-sibling::screen[1][@role='root'] and
+ @role='root'">
<xsl:call-template name="begin-root"/>
</xsl:if>
</xsl:if>
@@ -762,7 +771,7 @@ cd $BOOTUNPACKDIR</xsl:text>
<xsl:if test="preceding-sibling::para[1]/xref[@linkend='bootscripts' or
@linkend='systemd-units']">
<!-- if the next "screen" tag is role="root", and we are role="root"
- the end-root has not been called. So do it -->
+ the end-root has not been called. -->
<xsl:if
test="following-sibling::screen[1][@role='root'] and @role='root'">
<xsl:call-template name="end-root"/>
@@ -770,9 +779,12 @@ cd $BOOTUNPACKDIR</xsl:text>
<xsl:text>
popd</xsl:text>
<!-- if the next "screen" tag is role="root", and we are role="root"
- the begin-root will not be called. So do it -->
+ the begin-root will not be called. So do it, except if the next
+ <screen> is itself a unit or bootscript install -->
<xsl:if
- test="following-sibling::screen[1][@role='root'] and @role='root'">
+ test="following-sibling::screen[1][@role='root'] and
+ @role='root' and
+ not(following-sibling::screen[1]/preceding-sibling::para[1]/xref[@linkend='bootscripts' or @linkend='systemd-units'])">
<xsl:call-template name="begin-root"/>
</xsl:if>
</xsl:if>
--
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