diff mbox series

[02/10] bitbake-setup: consistently add configuration commits at the end of updates

Message ID 20260102193438.2960561-2-alex.kanavin@gmail.com
State New
Headers show
Series [01/10] bitbake-setup: move the local source tests to the end | expand

Commit Message

Alexander Kanavin Jan. 2, 2026, 7:34 p.m. UTC
From: Alexander Kanavin <alex@linutronix.de>

bitbake-setup tracks configuration history under setup directory in config/.

Making commits in there wasn't consistently done in all init/update scenarios
sometimes leaving uncommitted files. Move the commit creation to the end of
update_build() function, ensuring it always happens.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 bin/bitbake-setup | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index 73f734e73..a0d1aaeda 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -342,6 +342,7 @@  def update_build(config, confdir, setupdir, layerdir, d, update_bb_conf="prompt"
     thisdir = os.path.dirname(config["path"]) if config["type"] == 'local' else None
     setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir, update_bb_conf)
     write_sources_fixed_revisions(confdir, sources_fixed_revisions)
+    commit_config(confdir)
 
 def int_input(allowed_values, prompt=''):
     n = None
@@ -581,7 +582,6 @@  def init_config(top_dir, settings, args):
 
     write_upstream_config(confdir, upstream_config)
     update_build(upstream_config, confdir, setupdir, layerdir, d, update_bb_conf="yes")
-    commit_config(confdir)
 
     bb.event.remove("bb.build.TaskProgress", None)
 
@@ -648,7 +648,6 @@  def build_status(top_dir, settings, args, d, update=False):
     if config_diff:
         logger.plain('\nConfiguration in {} has changed:\n{}'.format(setupdir, config_diff))
         if update:
-            commit_config(confdir)
             update_build(new_upstream_config, confdir, setupdir, layerdir, d,
                          update_bb_conf=args.update_bb_conf)
         else: