Merge trunk r3940,41
This commit is contained in:
parent
90f822ab03
commit
580d773239
2 changed files with 36 additions and 25 deletions
48
LFS/lfs.xsl
48
LFS/lfs.xsl
|
@ -10,6 +10,10 @@
|
||||||
|
|
||||||
<!-- Parameters -->
|
<!-- Parameters -->
|
||||||
|
|
||||||
|
<!-- which revision attribute to include: can only be sysv or systemd,
|
||||||
|
but we leave checking to the caller-->
|
||||||
|
<xsl:param name="revision" select="'sysv'"/>
|
||||||
|
|
||||||
<!-- use package management ?
|
<!-- use package management ?
|
||||||
n = no, original behavior
|
n = no, original behavior
|
||||||
y = yes, add PKG_DEST to scripts in install commands of chapter06-08
|
y = yes, add PKG_DEST to scripts in install commands of chapter06-08
|
||||||
|
@ -69,19 +73,24 @@
|
||||||
<!-- End parameters -->
|
<!-- End parameters -->
|
||||||
|
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:apply-templates select="//sect1"/>
|
<xsl:apply-templates select="//sect1[not(@revision) or
|
||||||
|
@revision=$revision]"/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="sect1">
|
<xsl:template match="sect1">
|
||||||
|
<!-- Since this xsl:if tag encloses the whole template, it would
|
||||||
|
be much better to transpose this condition to the select part
|
||||||
|
of the "calling" apply-template. But that would change the numbering,
|
||||||
|
so that it would be difficult to compare to previous versions. So for
|
||||||
|
version 2.4, let us keep this -->
|
||||||
<xsl:if test="(../@id='chapter-temporary-tools' or
|
<xsl:if test="(../@id='chapter-temporary-tools' or
|
||||||
../@id='chapter-building-system' or
|
../@id='chapter-building-system' or
|
||||||
../@id='chapter-bootscripts' or
|
../@id='chapter-bootscripts' or
|
||||||
../@id='chapter-bootable') and
|
../@id='chapter-bootable') and
|
||||||
count(descendant::screen/userinput) > 0 and
|
(sect2[not(@revision) or @revision=$revision]//..|.)/
|
||||||
count(descendant::screen/userinput) >
|
screen[(not(@role) or @role != 'nodump') and
|
||||||
count(descendant::screen[@role='nodump']) and
|
(not(@revision) or @revision=$revision)]/
|
||||||
count(descendant::screen/userinput) >
|
userinput[not(starts-with(string(),'chroot'))]">
|
||||||
count(descendant::screen/userinput[starts-with(string(),'chroot')])">
|
|
||||||
<!-- The last condition is a hack to allow previous versions of the
|
<!-- The last condition is a hack to allow previous versions of the
|
||||||
book where the chroot commands did not have role="nodump".
|
book where the chroot commands did not have role="nodump".
|
||||||
It only works if the chroot command is the only one on the page -->
|
It only works if the chroot command is the only one on the page -->
|
||||||
|
@ -148,9 +157,12 @@
|
||||||
<xsl:if test="sect2[@role='installation']">
|
<xsl:if test="sect2[@role='installation']">
|
||||||
<xsl:text>cd $PKGDIR
</xsl:text>
|
<xsl:text>cd $PKGDIR
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates select="sect2|
|
<xsl:apply-templates select="sect2[not(@revision) or
|
||||||
screen[not(@role) or
|
@revision=$revision] |
|
||||||
@role!='nodump']/userinput"/>
|
screen[(not(@role) or
|
||||||
|
@role!='nodump') and
|
||||||
|
(not(@revision) or
|
||||||
|
@revision=$revision)]/userinput"/>
|
||||||
<xsl:if test="@id='ch-system-creatingdirs' and $pkgmngt='y'">
|
<xsl:if test="@id='ch-system-creatingdirs' and $pkgmngt='y'">
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select="document('packageManager.xml')//sect1[
|
select="document('packageManager.xml')//sect1[
|
||||||
|
@ -173,8 +185,10 @@
|
||||||
|
|
||||||
<xsl:template match="sect2">
|
<xsl:template match="sect2">
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select=".//screen[not(@role) or
|
select=".//screen[(not(@role) or
|
||||||
@role != 'nodump']/userinput[
|
@role != 'nodump') and
|
||||||
|
(not(@revision) or
|
||||||
|
@revision=$revision)]/userinput[
|
||||||
@remap = 'pre' or
|
@remap = 'pre' or
|
||||||
@remap = 'configure' or
|
@remap = 'configure' or
|
||||||
@remap = 'make' or
|
@remap = 'make' or
|
||||||
|
@ -213,8 +227,10 @@ esac
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select=".//screen[not(@role) or
|
select=".//screen[(not(@role) or
|
||||||
@role != 'nodump']/userinput[@remap = 'install']"/>
|
@role != 'nodump') and
|
||||||
|
(not(@revision) or
|
||||||
|
@revision=$revision)]/userinput[@remap = 'install']"/>
|
||||||
<xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
|
<xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
|
||||||
$pkgmngt = 'y' and
|
$pkgmngt = 'y' and
|
||||||
descendant::screen[not(@role) or
|
descendant::screen[not(@role) or
|
||||||
|
@ -318,8 +334,10 @@ fi
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select=".//screen[
|
select=".//screen[
|
||||||
not(@role) or
|
(not(@role) or
|
||||||
@role != 'nodump'
|
@role != 'nodump') and
|
||||||
|
(not(@revision) or
|
||||||
|
@revision=$revision)
|
||||||
]/userinput[
|
]/userinput[
|
||||||
not(@remap) or
|
not(@remap) or
|
||||||
@remap='adjust' or
|
@remap='adjust' or
|
||||||
|
|
|
@ -150,14 +150,9 @@ extract_commands() { #
|
||||||
fi
|
fi
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
xsltproc --nonet \
|
|
||||||
--xinclude \
|
|
||||||
--output /tmp/lfs-full.xml \
|
|
||||||
--stringparam profile.revision $INITSYS \
|
|
||||||
$BOOK/stylesheets/lfs-xsl/profile.xsl \
|
|
||||||
$BOOK/index.xml
|
|
||||||
|
|
||||||
xsltproc --nonet \
|
xsltproc --nonet \
|
||||||
|
--xinclude \
|
||||||
|
--stringparam revision $INITSYS \
|
||||||
--stringparam testsuite $TEST \
|
--stringparam testsuite $TEST \
|
||||||
--stringparam bomb-testsuite $BOMB_TEST \
|
--stringparam bomb-testsuite $BOMB_TEST \
|
||||||
--stringparam vim-lang $VIMLANG \
|
--stringparam vim-lang $VIMLANG \
|
||||||
|
@ -178,9 +173,7 @@ extract_commands() { #
|
||||||
--stringparam nameserver2 $DNS2 \
|
--stringparam nameserver2 $DNS2 \
|
||||||
--output ./${PROGNAME}-commands/ \
|
--output ./${PROGNAME}-commands/ \
|
||||||
$XSL \
|
$XSL \
|
||||||
/tmp/lfs-full.xml >>$LOGDIR/$LOG 2>&1
|
$BOOK/index.xml
|
||||||
|
|
||||||
rm /tmp/lfs-full.xml
|
|
||||||
;;
|
;;
|
||||||
*) echo -n " ${L_arrow}${PROGNAME}${R_arrow} book invalid, terminate build... "
|
*) echo -n " ${L_arrow}${PROGNAME}${R_arrow} book invalid, terminate build... "
|
||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
|
|
Reference in a new issue