diff options
author | Xi Ruoyao <xry111@mengyan1223.wang> | 2022-02-05 11:36:39 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@mengyan1223.wang> | 2022-02-05 20:48:27 +0800 |
commit | 490dc15317e18e4f87d2a2555adc6ce2c2a774ba (patch) | |
tree | cdd4f927f4ca62b6cbd3ddc26260015232ba0aaf /chapter04 | |
parent | 69c4524b6df4f5ac7b87e868afe55569b61752a8 (diff) |
remove "+h" in bash commands in chroot (#4998)
In the new cross-compilation approach, the $PATH in chroot does not
contain '/tools/bin'. So "+h" is useless in chroot as the newly
installed tools always replace the temporary counterpart at the same
location.
"+h" in chapter4/settingenviron.xml is kept deliberately. Currently
$LFS/tools/bin only contains programs prefixed with
"x86_64-lfs-linux-gnu-", and it's highly unlikely that any distro will
ever ship a program named with such prefix. So it may seems that we can
remove this "+h" as well. However, the situation may change in future
and we can take this oppertunity to teach the advantage and disvantage
of bash hash feature.
Diffstat (limited to 'chapter04')
-rw-r--r-- | chapter04/settingenviron.xml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chapter04/settingenviron.xml b/chapter04/settingenviron.xml index 4c419d00a..b0c3441e5 100644 --- a/chapter04/settingenviron.xml +++ b/chapter04/settingenviron.xml @@ -64,9 +64,11 @@ EOF</userinput></screen> be used as soon as they are installed. By switching off the hash function, the shell will always search the <envar>PATH</envar> when a program is to be run. As such, the shell will find the newly compiled tools in - <filename class="directory">$LFS/tools</filename> as soon as they are - available without remembering a previous version of the same program in a - different location.</para> + <filename class="directory">$LFS/tools/bin</filename> as soon as they are + available without remembering a previous version of the same program + provided by the host distro, in + <filename class='directory'>/usr/bin</filename> or + <filename class='directory'>/bin</filename>.</para> </listitem> </varlistentry> |