summaryrefslogtreecommitdiffstats
path: root/documentation/set_versions.py
diff options
context:
space:
mode:
authorHaixiao Yan <haixiao.yan.cn@windriver.com>2025-09-12 09:59:33 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-09-15 17:57:23 +0100
commitf5adf527f2e3279432800218986505f894167d3d (patch)
tree5e97bafcaa389f6a0cb09c6198b18ae33eb5337e /documentation/set_versions.py
parent6091eb2b58a5004f68acb1819387eb80a1001ca6 (diff)
downloadpoky-f5adf527f2e3279432800218986505f894167d3d.tar.gz
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>
Diffstat (limited to 'documentation/set_versions.py')
0 files changed, 0 insertions, 0 deletions