| Message ID | 20251224150805.3312684-2-adrian.freihofer@siemens.com |
|---|---|
| State | Changes Requested |
| Headers | show |
| Series | oe-setup-vscode: improve bitbake-setup compatibility | expand |
On Wed, 24 Dec 2025 at 16:08, Adrian Freihofer via lists.openembedded.org <adrian.freihofer=siemens.com@lists.openembedded.org> wrote: > ws_builddir="$(echo "$BUILDDIR" | sed -e "s|$OEINIT|\${workspaceFolder}|g")" > +bb_dir="$(dirname "$(which bitbake)" | sed 's|/bin$||')" This assumes bitbake executable is in PATH, which may or may not be true. I'd rather pass it in as an explicit command line parameter. Alex
diff --git a/scripts/oe-setup-vscode b/scripts/oe-setup-vscode index b8642780d5..6818641d42 100755 --- a/scripts/oe-setup-vscode +++ b/scripts/oe-setup-vscode @@ -22,13 +22,14 @@ fi VSCODE_SETTINGS=$VSCODEDIR/settings.json ws_builddir="$(echo "$BUILDDIR" | sed -e "s|$OEINIT|\${workspaceFolder}|g")" +bb_dir="$(dirname "$(which bitbake)" | sed 's|/bin$||')" # If BUILDDIR is in scope of VSCode ensure VSCode does not try to index the build folder. # This would lead to a busy CPU and finally to an OOM exception. mkdir -p "$VSCODEDIR" cat <<EOMsettings > "$VSCODE_SETTINGS" { - "bitbake.pathToBitbakeFolder": "\${workspaceFolder}/bitbake", + "bitbake.pathToBitbakeFolder": "$bb_dir", "bitbake.pathToEnvScript": "\${workspaceFolder}/oe-init-build-env", "bitbake.pathToBuildFolder": "$ws_builddir", "bitbake.commandWrapper": "",