[oe-commits] [openembedded-core] branch master-next updated: lib/oe/utils: add eol to format_pkg_list()

git at git.openembedded.org git at git.openembedded.org
Tue Oct 2 16:20:08 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

The following commit(s) were added to refs/heads/master-next by this push:
     new c117447  lib/oe/utils: add eol to format_pkg_list()
c117447 is described below

commit c11744790f1db259ff879eb0648095ab5679ac0e
Author: grygorii tertychnyi via Openembedded-core <openembedded-core at lists.openembedded.org>
AuthorDate: Mon Oct 1 18:47:23 2018 +0300

    lib/oe/utils: add eol to format_pkg_list()
    
    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 <gtertych at cisco.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 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 93b0763..cd12ce5 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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list