diff mbox series

[1/4] bitbake-setup: update vscode workspace always

Message ID 20260406202430.1856836-2-adrian.freihofer@siemens.com
State New
Headers show
Series bitbake-setup: extra-remotes support for contrib push mirrors | expand

Commit Message

AdrianF April 6, 2026, 8:24 p.m. UTC
From: Adrian Freihofer <adrian.freihofer@siemens.com>

Update the vscode workspace file with the current build directory, even
if the configuration in the registry has not changed. This allows to
keep the workspace file up to date when the build directory is changed
manually.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 bin/bitbake-setup | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index c006a059c..5a3394092 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -956,6 +956,11 @@  def build_status(top_dir, settings, args, d, update=False):
         return
 
     logger.plain("\nConfiguration in {} has not changed.".format(setupdir))
+    if update:
+        workspace_file = os.path.join(setupdir, "bitbake.code-workspace")
+        if os.path.exists(workspace_file):
+            bitbake_builddir = os.path.join(setupdir, "build")
+            configure_vscode(setupdir, layerdir, bitbake_builddir, os.path.join(bitbake_builddir, "init-build-env"))
 
 def build_update(top_dir, settings, args, d):
     build_status(top_dir, settings, args, d, update=True)