Element : <base>

Syntax

<!ELEMENT base           (#PCDATA)>

This element occurs in : Element: <stageinfo>

This element occurs as an attribute in the elements : Element : <alfs> | Element : <configure> | Element : <copy> | Element: <execute> | Element: <link> | Element: <make> | Element: <mkdir> | Element: <move> | Element: <ownership> | Element: <patch> | Element: <permissions> | Element: <search_replace> | Element: <textdump>

Description

The base element when used as an element specifies the base directory which will be used by all the commands in the stage (inherited), unless another base is specified at the level of the command as an attribute.

The base element when used as an attribute specifies the base directory which will be used by any parent element it was called from.

[Important] Important

It is very important to understand the difference between the two uses. Most importantly understand that the base element/attribute has no effect on the parent element it is used in unless relative paths are used in the parent element's other attributes and child elements.

Examples

<stage name="Install gzip">

        <stageinfo>

                <root>/mnt/lfs</root>
                <user>lfs</user>
                <environment>
                        <variable name="PATH">/bin:/sbin</variable>
                </environment>
                <base>/usr/src/gzip.1.2.4a</base>

        </stageinfo>

        <configure>
        </configure>

        <make>
        </make>

        <make>
                <param>install</param>
        </make>

</stage>

The equivalent bash script is :

echo Executing configure
su - lfs
export PATH=/bin:/sbin
cd /usr/src/gzip.1.2.4a
./configure

echo Executing make
su - lfs
export PATH=/bin:/sbin
cd /usr/src/gzip.1.2.4a
make

echo Executing make
su - lfs
export PATH=/bin:/sbin
cd /usr/src/gzip.1.2.4a
make install

echo Exiting stage