diff mbox series

[3/7] bitbake-setup: do not print a premature notice about renaming bitbake configuration

Message ID 20260116095741.3654153-3-alex.kanavin@gmail.com
State New
Headers show
Series [1/7] bitbake-setup: pass only the registry settting into obtain_config(), not the whole settings | expand

Commit Message

Alexander Kanavin Jan. 16, 2026, 9:57 a.m. UTC
From: Alexander Kanavin <alex@linutronix.de>

This was done before setting up a new bitbake configuration, so that
it does not write over the old one, comparing the old and the new
bitbake configurations, and taking one of three possible actions:

- no changes, no need to keep a backup;
- changes exist, do not replace existing config
- changes exist, replace existing config.

All three options correctly print the eventual outcome,
so this early print is unnecessary and confusing.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 bin/bitbake-setup     | 1 -
 lib/bb/tests/setup.py | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index b61436272..8b5cb37ba 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -309,7 +309,6 @@  def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir, update_bb_c
 
     if os.path.exists(bitbake_confdir):
         os.rename(bitbake_confdir, backup_bitbake_confdir)
-        logger.info("Existing bitbake configuration directory renamed to {}".format(backup_bitbake_confdir))
 
     if layers:
         filerelative_layers = bitbake_config.get("bb-layers-file-relative") or []
diff --git a/lib/bb/tests/setup.py b/lib/bb/tests/setup.py
index 834d09854..802f017fb 100644
--- a/lib/bb/tests/setup.py
+++ b/lib/bb/tests/setup.py
@@ -362,7 +362,7 @@  print("BBPATH is {{}}".format(os.environ["BBPATH"]))
             self.assertIn("Layer repository file://{} checked out into {}/layers/test-repo updated revision master from".format(self.testrepopath, setuppath), out[0])
             out = self.runbbsetup("update --update-bb-conf='yes'")
             if c in ('gadget', 'gizmo'):
-                self.assertIn("Existing bitbake configuration directory renamed to {}/build/conf-backup.".format(setuppath), out[0])
+                self.assertIn("Leaving the previous configuration in {}/build/conf-backup.".format(setuppath), out[0])
                 self.assertIn('-{}+{}'.format(prev_test_file_content, test_file_content), out[0])
             self.check_setupdir_files(setuppath, test_file_content)
 
@@ -386,7 +386,7 @@  print("BBPATH is {{}}".format(os.environ["BBPATH"]))
             self.assertIn('-                    "rev": "master"\n+                    "rev": "another-branch"', out[0])
             out = self.runbbsetup("update --update-bb-conf='yes'")
             if c in ('gadget', 'gizmo'):
-                self.assertIn("Existing bitbake configuration directory renamed to {}/build/conf-backup.".format(setuppath), out[0])
+                self.assertIn("Leaving the previous configuration in {}/build/conf-backup.".format(setuppath), out[0])
                 self.assertIn('-{}+{}'.format(prev_test_file_content, test_file_content), out[0])
             self.check_setupdir_files(setuppath, test_file_content)