diff options
author | George Nita <george.nita@enea.com> | 2015-11-25 16:28:45 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-01 21:32:02 +0000 |
commit | 8d784baf25861161a3bdc513e2f5236c0c19710d (patch) | |
tree | 6a6beb29e98a0804be01f147c3328e51c727556c | |
parent | 7f3c20f87d8e9113a14bbac3080cb6dee2469e8d (diff) | |
download | poky-8d784baf25861161a3bdc513e2f5236c0c19710d.tar.gz |
toolchain-shar-extract.sh: Ensure it's ran in clean environment
Fixes [YOCTO #8698] -- https://bugzilla.yoctoproject.org/show_bug.cgi?id=8698
If prior to running the toolchain installation script a toolchain
environment script is sourced then the toolchain installation will
fail. This because the environment is now set for the sourced toolchain
and doesn't suit the installation. In particular PATH points to the
toolchain executables.
The fix makes the script recursively call itself a second time with a
clean environment.
Tested by sourcing a previous successfully installed environment, erasing the
previous installation directory and then reinstalling in the same directory.
(From OE-Core rev: 6d2074d477596971dc52027dd87b02af7f39138d)
Signed-off-by: George Nita <george.nita@enea.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/files/toolchain-shar-extract.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh index 954b6b3f6b..8ef2b77557 100644 --- a/meta/files/toolchain-shar-extract.sh +++ b/meta/files/toolchain-shar-extract.sh | |||
@@ -1,5 +1,7 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | [ -z "$ENVCLEANED" ] && exec /usr/bin/env -i ENVCLEANED=1 "$0" "$@" | ||
4 | |||
3 | INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") | 5 | INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") |
4 | SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") | 6 | SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") |
5 | 7 | ||