[bitbake-devel] bitbake: adding a new comment should be placed on a new line

Submitted by Cristiana Voicu on June 25, 2013, 1:03 p.m.


Message ID 1372165405-25858-1-git-send-email-cristiana.voicu@intel.com
State New
Headers show

Commit Message

Cristiana Voicu June 25, 2013, 1:03 p.m.
In this case, the comment is appended to the end of the file.
Some text editors, do not place  a '\n' to the end of the file
after saving it.

[YOCTO #4636]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
 bitbake/lib/bb/cooker.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 2245f8e..49e6345 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -234,7 +234,7 @@  class BBCooker:
                 total += c
             #add the variable on a single line, to be easy to replace the second time
-            total += "#added by bitbake"
+            total += "\n#added by bitbake"
             total += "\n%s = \"%s\"\n" % (var, val)
             with open(default_file, 'w') as f: