diff options
author | Wenlin Kang <wenlin.kang@windriver.com> | 2016-03-23 16:35:49 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-28 15:54:51 +0100 |
commit | 2145bd0d188158c2db85b583b4d7f3ad4612593b (patch) | |
tree | 6f4169d1a4d73ef34bee7432d956da9b13a445c5 /meta/files | |
parent | c43192c46bb1759bf6909190b89d3b60918777c5 (diff) | |
download | openembedded-core-2145bd0d188158c2db85b583b4d7f3ad4612593b.tar.gz openembedded-core-2145bd0d188158c2db85b583b4d7f3ad4612593b.tar.bz2 openembedded-core-2145bd0d188158c2db85b583b4d7f3ad4612593b.zip |
toolchain-shar-extract.sh: check the length for target_sdk_dir
Check the length for target_sdk_dir to ensure the relocation
behaviour in relocate_sdk.py is correct.
Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/files')
-rw-r--r-- | meta/files/toolchain-shar-extract.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/files/toolchain-shar-extract.sh b/meta/files/toolchain-shar-extract.sh index 12d39c3893..0295bded6e 100644 --- a/meta/files/toolchain-shar-extract.sh +++ b/meta/files/toolchain-shar-extract.sh @@ -110,6 +110,12 @@ else target_sdk_dir=$(readlink -m "$target_sdk_dir") fi +# limit the length for target_sdk_dir, ensure the relocation behaviour in relocate_sdk.py has right result. +if [ ${#target_sdk_dir} -gt 2048 ]; then + echo "Error: The target directory path is too long!!!" + exit 1 +fi + if [ "$SDK_EXTENSIBLE" = "1" ]; then # We're going to be running the build system, additional restrictions apply if echo "$target_sdk_dir" | grep -q '[+\ @$]'; then |