]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toolchain-shar-extract.sh: exit when post-relocate-setup.sh fails
authorChen Qi <Qi.Chen@windriver.com>
Wed, 9 Oct 2024 08:56:47 +0000 (01:56 -0700)
committerSteve Sakoman <steve@sakoman.com>
Fri, 22 Nov 2024 13:46:04 +0000 (05:46 -0800)
When LD_LIBRARY_PATH is set, post-relocate-setup.sh will fail and
exit properly. But such failure is ignored and the SDK installation
will continue and tell user that things succeed. This is misleading.
So exit immediately if post-relocate-setup.sh fails.

Fixes [Yocto #15586]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c8e2dcc1f71aa33cc6e56dfdebebbe7ef010c944)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/files/toolchain-shar-extract.sh

index 89d30005fd42d28eaeb71aa4b8842734a2b49157..3b4647fca7b35794e6db94a068feca94f28f5e46 100644 (file)
@@ -286,6 +286,10 @@ post_relocate="$target_sdk_dir/post-relocate-setup.sh"
 if [ -e "$post_relocate" ]; then
        $SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $post_relocate
        $SUDO_EXEC /bin/sh $post_relocate "$target_sdk_dir" "@SDKPATH@"
+       if [ $? -ne 0 ]; then
+               echo "Executing $post_relocate failed"
+               exit 1
+       fi
        $SUDO_EXEC rm -f $post_relocate
 fi