Files
poky/meta/recipes-support
Haixiao Yan f5adf527f2 buildtools-tarball: fix unbound variable issues under 'set -u'
When Bash runs with 'set -u' (nounset), accessing an unset variable
directly (e.g. [ -z "$SSL_CERT_FILE" ]) causes a fatal "unbound variable"
error. As a result, the fallback logic to set SSL_CERT_FILE/SSL_CERT_DIR
is never triggered and the script aborts.

The current code assumes these variables may be unset or empty, but does
not guard against 'set -u'. This breaks builds in stricter shell
environments or when users explicitly enable 'set -u'.

Fix this by using parameter expansion with a default value, e.g.
"${SSL_CERT_FILE:-}", so that unset variables are treated as empty
strings. This preserves the intended logic (respect host env first, then
CAFILE/CAPATH, then buildtools defaults) and makes the script robust
under 'set -u'.

(From OE-Core rev: 4d880c2eccd534133a2a4e6579d955605c0956ec)

Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-09-15 17:57:23 +01:00
..
2025-06-20 12:07:27 +01:00
2025-03-27 11:19:04 +00:00
2025-09-08 18:02:39 +01:00
2025-09-11 11:31:56 +01:00
2024-10-11 12:17:02 +01:00
2025-08-04 18:04:04 +01:00
2025-09-15 17:57:23 +01:00
2025-07-28 14:51:50 +01:00
2025-09-11 11:31:56 +01:00
2025-08-25 17:47:21 +01:00
2022-04-14 09:47:00 +01:00
2025-05-27 09:01:16 +01:00
2025-02-05 12:49:55 +00:00
2025-09-01 23:07:06 +01:00
2025-08-28 10:47:09 +01:00
2025-07-21 23:00:18 +01:00
2023-06-28 07:56:33 +01:00
2024-11-18 22:09:02 +00:00
2025-09-08 14:05:11 +01:00
2024-01-24 15:46:19 +00:00
2025-06-20 12:07:27 +01:00
2025-06-20 12:07:27 +01:00
2025-08-07 12:11:15 +01:00
2024-11-27 14:58:48 +00:00
2025-08-19 09:48:36 +01:00
2025-09-08 18:02:39 +01:00
2022-11-22 12:26:46 +00:00
2025-07-10 10:47:31 +01:00
2025-06-20 12:07:27 +01:00
2025-07-17 10:41:18 +01:00
2025-08-25 17:47:21 +01:00
2025-09-01 23:07:06 +01:00