diff mbox series

bitbake-setup: always write newline at end of the README

Message ID 20260611-bb-setup-fix-readme-newline-v1-1-5f5dfc57ff28@toradex.com
State New
Headers show
Series bitbake-setup: always write newline at end of the README | expand

Commit Message

Ernest Van Hoecke June 11, 2026, 12:41 p.m. UTC
From: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>

When the "readme_extra" string was introduced, we dropped a newline in
the "readme" multiline string. In a Python multiline string, this counts
and therefore we dropped the newline at the end of the README unless
readme_extra is not empty (i.e.: unless the VS Code string is included
which includes a newline).

Put the newline back into the readme string and edit the VS Code extra
string accordingly.

Fixes: 92fd721941fd ("bitbake-setup: generate config files for VSCode")
Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
---
To: bitbake-devel@lists.openembedded.org
Cc: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 bin/bitbake-setup | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


---
base-commit: c687d42b81b17e7a2399099cab0f1a6aafcf6520
change-id: 20260611-bb-setup-fix-readme-newline-3e8d91028bed

Best regards,
diff mbox series

Patch

diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index 69c9882f4c45..767b7e3f739b 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -415,12 +415,13 @@  def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir, update_bb_c
 
     readme_extra = ""
     if init_vscode:
-        readme_extra = "\n\nTo edit the code in VSCode, open the workspace: code {}\n".format(workspace_file)
+        readme_extra = "\nTo edit the code in VSCode, open the workspace: code {}\n".format(workspace_file)
 
     readme = """{}\n\nAdditional information is in {} and {}\n
 Source the environment using '. {}' to run builds from the command line.\n
 {}\n
-The bitbake configuration files (local.conf, bblayers.conf and more) can be found in {}/conf{}""".format(
+The bitbake configuration files (local.conf, bblayers.conf and more) can be found in {}/conf
+{}""".format(
         bitbake_config["description"],
         os.path.join(bitbake_builddir,'conf/conf-summary.txt'),
         os.path.join(bitbake_builddir,'conf/conf-notes.txt'),