mbox series

[0/9] bitbake-setup: improvements, VSCode workspace generation

Message ID 20260322193440.870120-1-adrian.freihofer@siemens.com
Headers show
Series bitbake-setup: improvements, VSCode workspace generation | expand

Message

AdrianF March 22, 2026, 7:34 p.m. UTC
From: Adrian Freihofer <adrian.freihofer@siemens.com>

Based on master-next with commit from Alex
  bitbake-setup: use non-destructive 'update' mode of the git fetcher

Adds:
- Tests for bitbake fetcher unpack_update: add GitUnpackUpdateTest covering
  the full unpack_update workflow — fast-forward rebase with local commits,
  dldir remote setup, conflict detection, staged/modified file blocking,
  untracked file handling, shallow clone rejection, and stale dldir remote.

- Some findings in bitbake-setup: always restore sys.stdout after fetch log
  redirection; fix dead guards in check_setupdir_files; clean up imports;
  turn unhandled Exception in main() into a clean ERROR log line and non-zero
  exit instead of a raw traceback; report local modifications that block an
  update with an actionable error message.

- VSCode workspace generation (--init-vscode / --no-init-vscode):
  bitbake-setup init and update can generate a bitbake.code-workspace file
  that configures the Yocto BitBake VS Code extension, Python analysis paths,
  file associations, and folders for each layer repository. User-added folders
  and settings are preserved on update; a corrupt workspace file is detected
  and left unchanged.

- bitbake-setup rebase strategy (--rebase-strategy stop|backup):
  When unpack_update() cannot rebase a layer repository due to local
  modifications or a merge conflict, the default 'stop' strategy aborts with
  a clear message. The 'backup' strategy renames the directory to a timestamped
  backup and re-clones from upstream instead.

Adrian Freihofer (9):
  bitbake-selftest: add GitUnpackUpdateTest
  bitbake-setup: always restore sys.stdout
  tests/setup: cleanup imports
  tests/setup: fix dead check_setupdir_files guards
  bitbake-setup: report local modifications blocking an update
  bitbake-setup: generate config files for VSCode
  tests/setup: add test_vscode for VSCode workspace generation
  bitbake-setup: add --rebase-strategy to the update command
  tests/setup: add test_update_rebase_strategy

 bin/bitbake-setup     | 235 ++++++++++++++++--
 lib/bb/tests/fetch.py | 563 +++++++++++++++++++++++++++++++++++++++++-
 lib/bb/tests/setup.py | 204 ++++++++++++++-
 3 files changed, 971 insertions(+), 31 deletions(-)