]> code.ossystems Code Review - openembedded-core.git/commitdiff
toolchain-scripts: print post-relocate error
authorMartin Kelly <mkelly@xevo.com>
Mon, 4 Jun 2018 23:05:59 +0000 (16:05 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 7 Jun 2018 07:52:13 +0000 (08:52 +0100)
Currently, if a post-relocate script fails, it fails silently. We should
be louder about this, as it likely indicates a broken SDK.

Print a message if a post-relocate script fails.

Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/toolchain-scripts.bbclass

index 7e2f8be81cfe71813ae15361a86063511b237e94..779cc3f5e42e282d214fb25881c674ecbc3aae23 100644 (file)
@@ -129,6 +129,11 @@ if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then
             continue
         fi
         \$s "\$1"
+        status=\$?
+        if [ \$status != 0 ]; then
+            echo "post-relocate command \"\$s \$1\" failed with status \$status" >&2
+            exit \$status
+        fi
     done
     rm -rf "${SDKPATHNATIVE}/post-relocate-setup.d"
 fi