diff mbox series

[wrynose,2.18,1/2] bitbake-setup: always write newline at end of the README

Message ID a39c273eb6915ab5a1713695b3fd46c52ecb33bd.1784281828.git.yoann.congal@smile.fr
State New
Headers show
Series [wrynose,2.18,1/2] bitbake-setup: always write newline at end of the README | expand

Commit Message

Yoann Congal July 17, 2026, 9:52 a.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>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 7e6466f48191c1e4ab9b91705deb237eff2c7f01)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 bin/bitbake-setup | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index 220540f7f..4d75ad612 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'),