Files
poky/meta/recipes-devtools
Haixiao Yan 619c008306 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: 3d161e94ad532f660d4a0259a32e26a32ea0c75d)

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>
(cherry picked from commit 4d880c2eccd534133a2a4e6579d955605c0956ec)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-22 12:21:23 -07:00
..
2025-03-27 11:19:04 +00:00
2024-01-21 12:27:12 +00:00
2025-09-09 09:30:07 -07:00
2024-11-25 22:23:25 +00:00
2025-03-17 22:38:32 +00:00
2024-11-27 14:58:48 +00:00
2024-09-03 10:21:38 +01:00
2024-11-27 14:58:48 +00:00
2024-05-28 09:38:23 +01:00
2025-08-04 09:12:23 -07:00
2025-08-26 06:33:14 -07:00
2025-03-19 12:09:06 +00:00
2024-04-16 08:07:01 +01:00
2025-01-04 12:34:04 +00:00
2025-06-20 09:21:27 -07:00
2025-08-26 06:33:14 -07:00
2024-10-29 11:19:57 +00:00
2023-09-26 10:35:27 +01:00
2024-09-30 17:00:50 +01:00
2024-11-18 22:09:02 +00:00
2025-03-17 17:09:22 +00:00
2024-08-23 09:12:37 +01:00
2025-03-17 17:09:22 +00:00
2024-08-28 09:14:26 +01:00
2025-03-25 21:20:41 +00:00
2025-03-17 22:38:32 +00:00
2025-03-27 11:19:03 +00:00
2025-07-29 08:42:34 -07:00
2024-06-04 12:04:52 +01:00
2024-05-28 09:38:24 +01:00
2024-08-29 21:58:19 +01:00
2025-07-29 08:42:34 -07:00
2025-05-19 08:57:20 -07:00
2025-05-19 08:57:20 -07:00
2025-05-14 08:33:40 -07:00
2025-03-06 11:16:47 +00:00
2025-01-20 13:38:59 +00:00
2025-07-21 09:18:00 -07:00
2024-11-22 16:53:37 +00:00
2024-12-05 17:07:10 +00:00
2025-07-04 07:50:16 -07:00
2025-01-23 11:56:47 +00:00
2025-02-05 12:49:55 +00:00
2025-03-27 11:19:04 +00:00
2025-03-17 17:09:22 +00:00
2025-02-05 12:49:56 +00:00