Files
poky/meta/recipes-connectivity
Haixiao Yan e3ce89324d 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: 4cf131ebd157b79226533b5a5074691dd0e1a4ab)

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 13:17:52 -07:00
..
2025-08-20 07:37:19 -07:00
2025-02-28 06:45:14 -08:00
2025-05-27 09:38:57 -07:00
2023-12-30 11:03:07 +00:00
2024-06-20 06:29:44 -07:00
2024-09-19 05:11:35 -07:00
2024-02-19 11:34:33 +00:00
2023-09-02 18:23:05 +01:00
2025-04-16 06:41:24 -07:00
2025-05-27 09:38:57 -07:00
2025-05-02 08:20:11 -07:00
2025-01-24 07:59:38 -08:00