Changeset 1dce189 for LFS


Ignore:
Timestamp:
03/29/2020 01:24:48 PM (4 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
ablfs-more, legacy, trunk
Children:
123105f
Parents:
a131250
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LFS/lfs.xsl

    ra131250 r1dce189  
    11431143PREV_SEC=${SECONDS}
    11441144      <!-- get the location of the system root -->
    1145 if [ -h /tools ]; then
    1146   ROOT=$(dirname $(readlink /tools))/
    1147 else
    1148   ROOT=/
    1149 fi
     1145ROOT=</xsl:text>
     1146    <xsl:choose>
     1147      <xsl:when test="ancestor::chapter/@id = 'chapter-temporary-tools'">
     1148        <xsl:text>$LFS/
     1149</xsl:text>
     1150      </xsl:when>
     1151      <xsl:otherwise>
     1152        <xsl:text>/
     1153</xsl:text>
     1154      </xsl:otherwise>
     1155    </xsl:choose>
     1156    <xsl:text>
    11501157SCRIPT_ROOT=</xsl:text>
    11511158    <xsl:copy-of select="$script-root"/>
Note: See TracChangeset for help on using the changeset viewer.