Do not rely on /tools for setting ROOT (again)

Using the chapter ancestor is not enough. It's better to use the sect1 id
and test that it starts with ch-tools: package-manager does not have this
ancestor. Also the virtual kernel filesystems are done before chroot,
so directly test this one.

This works for the current lfs book. We'll need something new if we
change the order of pages.
This commit is contained in:
Pierre Labastie 2020-03-29 13:42:43 +00:00
parent 1dce18968f
commit 123105f683

View file

@ -1144,7 +1144,8 @@ PREV_SEC=${SECONDS}
<!-- get the location of the system root --> <!-- get the location of the system root -->
ROOT=</xsl:text> ROOT=</xsl:text>
<xsl:choose> <xsl:choose>
<xsl:when test="ancestor::chapter/@id = 'chapter-temporary-tools'"> <xsl:when test="starts-with(./@id, 'ch-tools') or
contains (./@id, 'kernfs')">
<xsl:text>$LFS/ <xsl:text>$LFS/
</xsl:text> </xsl:text>
</xsl:when> </xsl:when>