Author: pierre
Date: Sun Mar 29 06:24:48 2020
New Revision: 4139
Log:
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.
Modified:
jhalfs/trunk/LFS/lfs.xsl
Modified: jhalfs/trunk/LFS/lfs.xsl
==============================================================================
--- jhalfs/trunk/LFS/lfs.xsl Sun Mar 29 06:17:38 2020 (r4138)
+++ jhalfs/trunk/LFS/lfs.xsl Sun Mar 29 06:24:48 2020 (r4139)
@@ -1142,11 +1142,18 @@
<!-- 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>
--
http://lists.linuxfromscratch.org/listinfo/alfs-log
Unsubscribe: See the above information page