poky/scripts/lib/devtool
Adrian Freihofer e9acea56bd 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.

(From OE-Core rev: 602802754485631f4e49bc844e473bc3ba7d38a4)

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-10-06 23:15:59 +01:00
..
ide_plugins devtool: ide-sdk code remove twxs.cmake 2025-06-16 17:57:30 +01:00
__init__.py devtool: __init__: simplify replace_from_file 2025-09-18 11:16:42 +01:00
build_image.py Convert to new override syntax 2021-08-02 15:44:10 +01:00
build_sdk.py devtool: build-sdk remove unused imports 2025-01-20 13:38:59 +00:00
build.py scripts/devtool: use bb.util.listtasks instead of __BBTASKS 2024-12-12 13:31:27 +00:00
deploy.py devtool: refactor deploy-target 2024-02-02 10:38:28 +00:00
export.py meta/lib+scripts: Convert to SPDX license headers 2019-05-09 16:31:55 +01:00
ide_sdk.py devtool: ide_sdk: pass BITBAKEDIR to oe-init-build-env 2025-10-06 23:15:59 +01:00
import.py meta/lib+scripts: Convert to SPDX license headers 2019-05-09 16:31:55 +01:00
menuconfig.py devtool: menuconfig remove useless code 2024-09-30 17:00:50 +01:00
package.py meta/lib+scripts: Convert to SPDX license headers 2019-05-09 16:31:55 +01:00
runqemu.py meta/lib+scripts: Convert to SPDX license headers 2019-05-09 16:31:55 +01:00
sdk.py build-sysroots: target or native sysroot population need to be selected explicitly 2023-09-09 12:04:55 +01:00
search.py package/scripts: Fix FILES_INFO handling 2021-08-17 09:53:04 +01:00
standard.py recipetool/devtool: calculate source paths relative to UNPACKDIR 2025-06-20 12:07:26 +01:00
upgrade.py devtool: fix upgrade for recipes with git submodules 2025-08-14 10:31:10 +01:00
utilcmds.py scripts/devtool: use bb.util.listtasks instead of __BBTASKS 2024-12-12 13:31:27 +00:00