LFS/lfs.xsl: fix cases when using DESTDIR

We cannot use only the fact that it is not in chapter-temporary-tools
since now we have several chapter for the temporary system.
so use a list of chapters (non negated).
This commit is contained in:
Pierre Labastie 2020-07-06 05:51:22 +00:00
parent 2f8d952deb
commit f017b22731

View file

@ -235,6 +235,7 @@ otherwise it is in /bin.-->
<xsl:if <xsl:if
test="ancestor::chapter[@id = 'chapter-building-system' or test="ancestor::chapter[@id = 'chapter-building-system' or
@id = 'chapter-config' or @id = 'chapter-config' or
@id = 'chapter-bootscripts' or
@id = 'chapter-bootable'] and @id = 'chapter-bootable'] and
$pkgmngt = 'y' and $pkgmngt = 'y' and
descendant::screen[not(@role) or descendant::screen[not(@role) or
@ -264,6 +265,7 @@ esac
userinput[@remap = 'install']"/> userinput[@remap = 'install']"/>
<xsl:if test="ancestor::chapter[@id = 'chapter-building-system' or <xsl:if test="ancestor::chapter[@id = 'chapter-building-system' or
@id = 'chapter-config' or @id = 'chapter-config' or
@id = 'chapter-bootscripts' or
@id = 'chapter-bootable'] and @id = 'chapter-bootable'] and
descendant::screen[not(@role) or descendant::screen[not(@role) or
@role != 'nodump']/userinput[ @role != 'nodump']/userinput[
@ -446,13 +448,14 @@ echo -e "\n\nTotalseconds: $SECONDS\n"
<xsl:with-param name="instructions" select="string()"/> <xsl:with-param name="instructions" select="string()"/>
</xsl:call-template> </xsl:call-template>
</xsl:when> </xsl:when>
<!-- Package management --> <!-- Package management for installation chapters -->
<!-- Add $PKG_DEST to installation commands --> <!-- Add $PKG_DEST to installation commands -->
<!-- Also add -j1 to make install --> <!-- Also add -j1 to make install -->
<xsl:when test="@remap='install' and <xsl:when test="@remap='install' and
not(ancestor::chapter[ ancestor::chapter[@id='chapter-building-system' or
@id='chapter-temporary-tools' @id = 'chapter-config' or
])"> @id = 'chapter-bootscripts' or
@id = 'chapter-bootable']">
<xsl:choose> <xsl:choose>
<xsl:when test="$pkgmngt='n'"> <xsl:when test="$pkgmngt='n'">
<xsl:choose> <xsl:choose>
@ -559,8 +562,10 @@ unset OLD_PKGDIR
</xsl:text> </xsl:text>
</xsl:when><!-- addition for tzdata + package management --> </xsl:when><!-- addition for tzdata + package management -->
<!-- End addition for package management --> <!-- End addition for package management -->
<!-- add -j1 to make install in chapter 5 --> <!-- add -j1 to make install in non final chapters -->
<xsl:when test="ancestor::chapter[@id='chapter-temporary-tools'] and <xsl:when test="ancestor::chapter[@id='chapter-temporary-tools' or
@id='chapter-chroot-temporary-tools' or
@id='chapter-cross-tools'] and
@remap='install'"> @remap='install'">
<xsl:choose> <xsl:choose>
<xsl:when test="contains(string(),'make ')"> <xsl:when test="contains(string(),'make ')">
@ -573,7 +578,7 @@ unset OLD_PKGDIR
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
<xsl:text>&#xA;</xsl:text> <xsl:text>&#xA;</xsl:text>
</xsl:when><!-- chapter 5 install --> </xsl:when><!-- temp chapters install -->
<!-- The rest of commands --> <!-- The rest of commands -->
<xsl:otherwise> <xsl:otherwise>
<xsl:apply-templates/> <xsl:apply-templates/>
@ -1242,6 +1247,7 @@ PACKAGE=</xsl:text>
</xsl:call-template> </xsl:call-template>
<xsl:if test = "( ../@id = 'chapter-building-system' or <xsl:if test = "( ../@id = 'chapter-building-system' or
../@id = 'chapter-config' or ../@id = 'chapter-config' or
../@id = 'chapter-bootscripts' or
../@id = 'chapter-bootable' or ../@id = 'chapter-bootable' or
starts-with(@id,'ch-system') ) and $pkgmngt = 'y'"> starts-with(@id,'ch-system') ) and $pkgmngt = 'y'">
<!-- the last alternative for old books where some sections in <!-- the last alternative for old books where some sections in