Don't use /tools for setting the ROOT variable
In the generated scriptlets, we need to know if we are on host or chrooted. Presently, we rely on /tools being a symlink or not. But we may want to remove this ugly symlink in future versions of LFS, so anticipate and use the chapter ancestor.
This commit is contained in:
parent
a131250b6f
commit
1dce18968f
1 changed files with 12 additions and 5 deletions
17
LFS/lfs.xsl
17
LFS/lfs.xsl
|
@ -1142,11 +1142,18 @@ LOGLEVEL="</xsl:text>
|
|||
<!-- save the timer, so that unpacking, and du is not counted -->
|
||||
PREV_SEC=${SECONDS}
|
||||
<!-- get the location of the system root -->
|
||||
if [ -h /tools ]; then
|
||||
ROOT=$(dirname $(readlink /tools))/
|
||||
else
|
||||
ROOT=/
|
||||
fi
|
||||
ROOT=</xsl:text>
|
||||
<xsl:choose>
|
||||
<xsl:when test="ancestor::chapter/@id = 'chapter-temporary-tools'">
|
||||
<xsl:text>$LFS/
|
||||
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>/
|
||||
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text>
|
||||
SCRIPT_ROOT=</xsl:text>
|
||||
<xsl:copy-of select="$script-root"/>
|
||||
<xsl:text>
|
||||
|
|
Reference in a new issue