Append '\n' to the 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. Signed-off-by: grygorii tertychnyi <gtert...@cisco.com> --- meta/lib/oe/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index 93b0763b0a..cd12ce5263 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py @@ -347,7 +347,7 @@ def format_pkg_list(pkg_dict, ret_format=None): for pkg in sorted(pkg_dict): output.append(pkg) - return '\n'.join(output) + return '\n'.join(output) + '\n' def host_gcc_version(d, taskcontextonly=False): import re, subprocess -- 2.19.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core