From: Jan Kircher <[email protected]>

Fixed an error when Bash's unbound variable protection is enabled (set -u) and 
variable "LD_LIBRARY_PATH" does not exist.

Signed-off-by: Jan Kircher <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
(cherry picked from commit 85685370b0ad93291cda59fb091a15eeecf5e0d5)
Signed-off-by: Steve Sakoman <[email protected]>
---
 meta/classes/toolchain-scripts.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/toolchain-scripts.bbclass 
b/meta/classes/toolchain-scripts.bbclass
index db1d3215ef..9aa31dc6cd 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -29,7 +29,7 @@ toolchain_create_sdk_env_script () {
        echo '# 
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80' >> 
$script
        echo '# http://xahlee.info/UnixResource_dir/_/ldpath.html' >> $script
        echo '# Only disable this check if you are absolutely know what you are 
doing!' >> $script
-       echo 'if [ ! -z "$LD_LIBRARY_PATH" ]; then' >> $script
+       echo 'if [ ! -z "${LD_LIBRARY_PATH:-}" ]; then' >> $script
        echo "    echo \"Your environment is misconfigured, you probably need 
to 'unset LD_LIBRARY_PATH'\"" >> $script
        echo "    echo \"but please check why this was set in the first place 
and that it's safe to unset.\"" >> $script
        echo '    echo "The SDK will not operate correctly in most cases when 
LD_LIBRARY_PATH is set."' >> $script
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176364): 
https://lists.openembedded.org/g/openembedded-core/message/176364
Mute This Topic: https://lists.openembedded.org/mt/96521268/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to