]> code.ossystems Code Review - openembedded-core.git/commitdiff
populate_sdk_base: Fix condition syntax if SDK_RELOCATE_AFTER_INSTALL is disabled
authorTomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Tue, 22 Dec 2020 13:21:54 +0000 (14:21 +0100)
committerSteve Sakoman <steve@sakoman.com>
Mon, 4 Jan 2021 14:50:23 +0000 (04:50 -1000)
If variable is set to empty string the comparison is "if [ -eq 1 ]"
which fails with "[: -eq: unary operator expected".

Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 36a2dc83fd0e1d6e2b8441e24a4cbc48a6c4fc19)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/populate_sdk_base.bbclass

index 3e5b1359d679696ee1fd0a31ce69a7a6bf4ecc5b..39a7cadaf8bc789a52bb7fa089050dd3f10f3a53 100644 (file)
@@ -256,7 +256,7 @@ fakeroot create_shar() {
 
        rm -f ${T}/pre_install_command ${T}/post_install_command
 
-       if [ ${SDK_RELOCATE_AFTER_INSTALL} -eq 1 ] ; then
+       if [ "${SDK_RELOCATE_AFTER_INSTALL}" = "1" ] ; then
                cp ${TOOLCHAIN_SHAR_REL_TMPL} ${T}/post_install_command
        fi
        cat << "EOF" >> ${T}/pre_install_command