summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorDaniel Wagenknecht <dwagenknecht@emlix.com>2025-09-09 09:42:27 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-09-11 11:31:57 +0100
commita1bd1174ce5edd6edab79964f38efd02952b0529 (patch)
treeb079b4a988516652b06e04ad1a623423aaaec520 /meta/recipes-core
parent7882955c3b44c237c415a5b208a39ca0cbc8265b (diff)
downloadpoky-a1bd1174ce5edd6edab79964f38efd02952b0529.tar.gz
buildtools-tarball: handle missing host pkg-config gracefully
The host might not have pkg-config installed, which is OK when using the buildtools-extended-tarball, since that contains pkg-config. So the command in the generated environment-setup-* script for setting HOST_PKG_PATH is expected to fail in some cases without this being an error. The generated environment-setup-* script might be sourced in a shell with activated `errexit` option. Prevent the expected failure of this command from being treated as an error. The only usage of the HOST_PKG_PATH variable is in this script and already handles the case of the variable being empty. The variable is not exposed to anywhere outside this script so the effects of this change are limited to this script. (From OE-Core rev: 049a802cef23f9ecb5d373c0d27753a891a4b5a6) Signed-off-by: Daniel Wagenknecht <dwagenknecht@emlix.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/meta/buildtools-tarball.bb2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
index 02117ab84d..61b98c7387 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -73,7 +73,7 @@ create_sdk_files:append () {
73 touch $script 73 touch $script
74 echo 'export PATH="${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${sbindir_nativesdk}:${SDKPATHNATIVE}${base_bindir_nativesdk}:${SDKPATHNATIVE}${base_sbindir_nativesdk}:$PATH"' >> $script 74 echo 'export PATH="${SDKPATHNATIVE}${bindir_nativesdk}:${SDKPATHNATIVE}${sbindir_nativesdk}:${SDKPATHNATIVE}${base_bindir_nativesdk}:${SDKPATHNATIVE}${base_sbindir_nativesdk}:$PATH"' >> $script
75 echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script 75 echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
76 echo 'HOST_PKG_PATH=$(command -p pkg-config --variable=pc_path pkg-config 2>/dev/null)' >>$script 76 echo 'HOST_PKG_PATH=$(command -p pkg-config --variable=pc_path pkg-config 2>/dev/null || true)' >>$script
77 echo 'export PKG_CONFIG_LIBDIR=${SDKPATHNATIVE}/${libdir}/pkgconfig:${SDKPATHNATIVE}/${datadir}/pkgconfig:${HOST_PKG_PATH:-/usr/lib/pkgconfig:/usr/share/pkgconfig}' >>$script 77 echo 'export PKG_CONFIG_LIBDIR=${SDKPATHNATIVE}/${libdir}/pkgconfig:${SDKPATHNATIVE}/${datadir}/pkgconfig:${HOST_PKG_PATH:-/usr/lib/pkgconfig:/usr/share/pkgconfig}' >>$script
78 echo 'unset HOST_PKG_PATH' 78 echo 'unset HOST_PKG_PATH'
79 79