]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
devtool: ide_sdk: pass BITBAKEDIR to oe-init-build-env
authorAdrian Freihofer <adrian.freihofer@siemens.com>
Sun, 5 Oct 2025 22:00:33 +0000 (00:00 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 6 Oct 2025 22:15:57 +0000 (23:15 +0100)
commit602802754485631f4e49bc844e473bc3ba7d38a4
tree5c6375f351cd874c7847195956fd1dcb0efc2522
parent7db8dd3631d3fcd112631761d8aa12886213273c
devtool: ide_sdk: pass BITBAKEDIR to oe-init-build-env

This fixes an issue where the generated install_and_deploy script is
unable to find the bitbake directory when run outside of the build
environment. This happens if the oe-selftest suite runs in a bitbake
environment that is bootstrapped by bitbake-setup.

oe-selftest -r devtool.DevtoolIdeSdkTests.test_devtool_ide_sdk_none_qemu

AssertionError: Command '.../build-st/workspace/ide-sdk/cmake-example/
  scripts/install_and_deploy_cmake-example-cortexa57' returned non-zero exit status 1:
Error: The bitbake directory (/tmp/devtoolqakq7kzgeo/bitbake) does not exist!
  Please ensure a copy of bitbake exists at this location or specify an
  alternative path on the command line
. /tmp/devtoolqakq7kzgeo/core-copy/oe-init-build-env
  /home/adrian/bitbake-builds/poky-master-poky-with-sstate-distro_poky-altcfg-machine_qemuarm64/build-st
  failed

Another reason this issue occurs with oe-selftests is that devtool
tests assume the full poky git repository is available. The setUpModule
function clones layer repositories, which for poky includes bitbake.
However, when using separate git repositories for bitbake and
openembedded-core, the bitbake directory is not preserved during layer
copying. While copying layers to allow modification during tests makes
sense, copying bitbake is less beneficial. Referring to the original
bitbake location is preferable, but cleaning up the devtool tests is
not part of this change.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/ide_sdk.py