diff options
author | grygorii tertychnyi via Openembedded-core <openembedded-core@lists.openembedded.org> | 2018-10-10 19:26:24 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-11 23:06:35 +0100 |
commit | bc8f229366eda5c920f5dfffd3612f951d5ba2b7 (patch) | |
tree | c5812c62118311318600b9c08fc5dd1115c0a293 /meta/classes | |
parent | 55fe5156ea7ff28e5f02f52eb99b73654050ecaa (diff) | |
download | poky-bc8f229366eda5c920f5dfffd3612f951d5ba2b7.tar.gz |
lib/oe/utils: add eol to format_pkg_list()
Append '\n' to the non-empty formatted string before return. If you
write it to the (manifest) file, it will ensure file ends with a newline.
Many GNU utilities have problems processing the last line of a file
if it is not '\n' terminated. E.g. if the last line is not terminated
by a newline character, then "read" will read it but return false,
leaving the broken partial line in the read variable(s).
It can also break or adversely affect some text processing tools,
that operate on the file.
(From OE-Core rev: ee4d0c879713ba50dc6cc3300f44647faebee2e0)
Signed-off-by: grygorii tertychnyi <gtertych@cisco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/rootfs-postcommands.bbclass | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass index e816824f28..bde58ad6cd 100644 --- a/meta/classes/rootfs-postcommands.bbclass +++ b/meta/classes/rootfs-postcommands.bbclass | |||
@@ -253,7 +253,6 @@ python write_image_manifest () { | |||
253 | pkgs = image_list_installed_packages(d) | 253 | pkgs = image_list_installed_packages(d) |
254 | with open(manifest_name, 'w+') as image_manifest: | 254 | with open(manifest_name, 'w+') as image_manifest: |
255 | image_manifest.write(format_pkg_list(pkgs, "ver")) | 255 | image_manifest.write(format_pkg_list(pkgs, "ver")) |
256 | image_manifest.write("\n") | ||
257 | 256 | ||
258 | if os.path.exists(manifest_name): | 257 | if os.path.exists(manifest_name): |
259 | manifest_link = deploy_dir + "/" + link_name + ".manifest" | 258 | manifest_link = deploy_dir + "/" + link_name + ".manifest" |