Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] toolchain-scripts: compatibility with unbound variable protection
@ 2023-01-04 12:26 Jan Kircher
  2023-01-04 12:33 ` Jan Kircher
  2023-01-06 12:33 ` [OE-core] " Alexandre Belloni
  0 siblings, 2 replies; 7+ messages in thread
From: Jan Kircher @ 2023-01-04 12:26 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jan Kircher

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 <jan.kircher@leica-microsystems.com>
---
 meta/classes-recipe/toolchain-scripts.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-recipe/toolchain-scripts.bbclass b/meta/classes-recipe/toolchain-scripts.bbclass
index 3cc823fe63..fa658a6596 100644
--- a/meta/classes-recipe/toolchain-scripts.bbclass
+++ b/meta/classes-recipe/toolchain-scripts.bbclass
@@ -37,7 +37,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.38.1

Please be advised that this email may contain confidential information. If you are not the intended recipient, please notify us by email by replying to the sender and delete this message. The sender disclaims that the content of this email constitutes an offer to enter into, or the acceptance of, any agreement; provided that the foregoing does not invalidate the binding effect of any digital or other electronic reproduction of a manual signature that is included in any attachment.


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] toolchain-scripts: compatibility with unbound variable protection
@ 2023-01-10 16:11 openembedded
  2023-01-10 16:20 ` Jan Kircher
  0 siblings, 1 reply; 7+ messages in thread
From: openembedded @ 2023-01-10 16:11 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jan Kircher

From: Jan Kircher <openembedded@hetsh.de>

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 <openembedded@hetsh.de>
---
 meta/classes-recipe/toolchain-scripts.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-recipe/toolchain-scripts.bbclass b/meta/classes-recipe/toolchain-scripts.bbclass
index 3cc823fe63..fa658a6596 100644
--- a/meta/classes-recipe/toolchain-scripts.bbclass
+++ b/meta/classes-recipe/toolchain-scripts.bbclass
@@ -37,7 +37,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.39.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] toolchain-scripts: compatibility with unbound variable protection
@ 2023-01-04 12:21 Jan Kircher
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Kircher @ 2023-01-04 12:21 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jan Kircher

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 <jan.kircher@leica-microsystems.com>
---
 meta/classes-recipe/toolchain-scripts.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-recipe/toolchain-scripts.bbclass b/meta/classes-recipe/toolchain-scripts.bbclass
index 3cc823fe63..fa658a6596 100644
--- a/meta/classes-recipe/toolchain-scripts.bbclass
+++ b/meta/classes-recipe/toolchain-scripts.bbclass
@@ -37,7 +37,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.38.1

Please be advised that this email may contain confidential information. If you are not the intended recipient, please notify us by email by replying to the sender and delete this message. The sender disclaims that the content of this email constitutes an offer to enter into, or the acceptance of, any agreement; provided that the foregoing does not invalidate the binding effect of any digital or other electronic reproduction of a manual signature that is included in any attachment.


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-11  8:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-04 12:26 [PATCH] toolchain-scripts: compatibility with unbound variable protection Jan Kircher
2023-01-04 12:33 ` Jan Kircher
2023-01-06 12:33 ` [OE-core] " Alexandre Belloni
2023-01-11  8:54   ` Jan Kircher
  -- strict thread matches above, loose matches on Subject: below --
2023-01-10 16:11 openembedded
2023-01-10 16:20 ` Jan Kircher
2023-01-04 12:21 Jan Kircher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox