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-08-13 08:42:58 -07:00
2025-01-08 12:37:20 +00:00
2025-02-11 11:44:19 +00:00
2025-03-17 22:38:32 +00:00
2024-11-21 12:16:28 +00:00
2023-03-21 22:42:05 +00:00
2024-10-22 12:28:17 +01:00
2023-07-10 11:36:34 +01:00
2024-11-01 12:13:18 +00:00
2024-11-04 14:34:42 +00:00
2025-01-23 11:56:47 +00:00
2024-11-12 11:09:51 +00:00
2024-09-04 12:38:44 +01:00
2024-10-01 12:40:48 +01:00
2025-02-05 12:49:55 +00:00
2025-09-22 12:21:23 -07:00
2025-07-04 07:50:16 -07:00
2022-02-25 15:07:50 +00:00
2025-07-04 07:50:16 -07:00
2025-08-13 08:42:58 -07:00
2024-08-15 14:51:55 +01:00
2024-02-20 11:39:45 +00:00
2025-01-08 12:37:20 +00:00
2025-03-17 22:38:32 +00:00
2025-02-18 22:53:45 +00:00
2025-03-06 11:16:47 +00:00
2025-03-06 11:16:47 +00:00
2025-03-06 11:16:47 +00:00
2024-12-17 11:41:53 +00:00
2024-09-30 17:00:51 +01:00
2025-01-08 12:37:20 +00:00
2025-02-05 12:49:55 +00:00
2025-02-11 11:44:19 +00:00
2024-07-24 22:51:39 +01:00
2025-01-09 16:59:23 +00:00
2025-03-17 22:38:32 +00:00
2025-03-17 22:38:32 +00:00
2025-03-17 22:38:32 +00:00
2025-03-17 22:38:32 +00:00
2025-02-18 22:53:45 +00:00
2025-03-20 11:29:04 +00:00
2024-12-24 13:49:27 +00:00
2024-07-03 14:57:50 +01:00
2024-12-05 17:07:10 +00:00
2025-02-18 22:53:45 +00:00
2023-08-14 12:51:21 +01:00
2018-07-30 12:44:35 +01:00
2025-02-27 10:55:17 +00:00
2024-12-17 11:41:53 +00:00
2025-01-09 15:26:50 +00:00
2024-12-17 11:41:53 +00:00
2024-12-17 11:41:53 +00:00
2024-12-24 13:49:27 +00:00
2025-03-17 22:38:32 +00:00
2025-01-08 12:37:20 +00:00
2025-03-18 10:27:31 +00:00
2023-02-24 13:31:45 +00:00
2024-10-22 12:28:17 +01:00
2024-02-20 11:39:45 +00:00
2025-03-17 22:38:32 +00:00
2024-07-26 12:28:42 +01:00
2024-11-01 12:13:18 +00:00
2024-12-17 11:41:53 +00:00
2025-01-08 12:37:20 +00:00
2025-02-18 11:56:03 +00:00
2025-02-18 11:56:04 +00:00
2024-02-20 11:39:45 +00:00
2025-02-18 22:53:45 +00:00
2024-12-17 11:41:53 +00:00
2025-01-08 12:37:20 +00:00
2025-03-17 22:38:32 +00:00
2025-03-17 22:38:32 +00:00
2024-12-17 11:41:53 +00:00
2025-02-05 12:49:55 +00:00
2024-12-17 11:41:53 +00:00
2025-02-18 22:53:45 +00:00
2024-11-18 22:09:03 +00:00
2024-07-24 22:51:40 +01:00
2024-09-04 12:38:44 +01:00
2025-01-08 12:37:20 +00:00
2025-02-18 22:53:45 +00:00
2025-01-08 12:37:20 +00:00
2024-02-20 11:39:45 +00:00
2025-02-18 22:53:45 +00:00
2022-03-16 08:48:08 +00:00
2025-02-18 22:53:45 +00:00
2025-01-08 12:37:20 +00:00
2024-09-30 17:00:51 +01:00
2024-05-15 16:39:19 +01:00
2025-03-19 11:49:45 +00:00
2025-03-19 11:49:45 +00:00
2025-03-06 11:16:47 +00:00
2025-02-05 12:49:55 +00:00
2025-06-02 10:26:30 -07:00
2025-02-05 12:49:55 +00:00
2025-01-03 10:51:27 +00:00
2024-12-17 11:41:53 +00:00
2025-03-17 22:38:32 +00:00
2024-02-20 11:39:45 +00:00
2024-12-17 11:41:53 +00:00
2025-03-06 11:16:47 +00:00
2024-12-24 13:49:28 +00:00
2025-02-05 12:49:55 +00:00
2025-01-08 12:37:20 +00:00
2025-02-05 12:49:56 +00:00
2025-02-05 12:49:55 +00:00
2025-06-20 09:21:27 -07:00
2024-12-17 11:41:53 +00:00
2022-02-20 16:45:25 +00:00
2025-03-11 21:29:50 +00:00
2025-01-08 12:37:20 +00:00
2025-01-08 12:37:20 +00:00
2025-02-05 12:49:56 +00:00
2025-03-17 22:38:32 +00:00
2024-12-17 11:41:53 +00:00
2025-07-04 07:50:16 -07:00
2025-03-17 22:38:32 +00:00
2025-02-27 10:55:17 +00:00
2024-12-24 13:49:28 +00:00
2024-12-17 11:41:53 +00:00
2024-02-20 11:39:45 +00:00
2022-03-18 23:27:27 +00:00
2021-05-21 15:18:23 +01:00
2024-10-11 12:17:02 +01:00
2025-02-27 10:55:17 +00:00
2024-12-17 11:41:53 +00:00
2024-12-17 11:41:53 +00:00
2024-12-17 11:41:53 +00:00
2024-12-17 11:41:53 +00:00
2024-03-07 17:25:02 +00:00
2023-04-13 13:53:44 +01:00
2024-12-17 11:41:53 +00:00
2024-12-17 11:41:53 +00:00
2024-07-24 22:51:40 +01:00
2024-06-25 11:50:58 +01:00
2025-03-17 22:38:32 +00:00
2024-12-17 11:41:53 +00:00
2025-02-10 13:03:58 +00:00
2024-07-26 12:28:42 +01:00
2025-01-08 12:37:20 +00:00
2025-07-04 07:50:16 -07:00
2021-11-26 17:01:08 +00:00
2025-01-08 12:37:20 +00:00
2025-01-08 12:37:20 +00:00
2025-03-17 22:38:32 +00:00
2024-11-27 16:44:48 +00:00
2025-01-08 12:37:20 +00:00
2025-03-17 22:38:32 +00:00
2024-11-27 14:58:48 +00:00
2020-06-23 12:31:03 +01:00
2024-02-20 11:39:45 +00:00
2024-06-07 23:21:42 +01:00
2024-12-24 13:49:28 +00:00