[OE-core] [PATCH] lib/oe/utils: add eol to format_pkg_list()

Grygorii Tertychnyi (gtertych) gtertych at cisco.com
Thu Oct 4 05:33:07 UTC 2018


From: Richard Purdie <richard.purdie at linuxfoundation.org>
Sent: Wednesday, October 3, 2018 5:23 PM

gt> Append '\n' to the formatted string before return. If you write it
gt> to the (manifest) file, it will ensure file ends with a newline.
gt>
gt> Many GNU utilities have problems processing the last line of a file
gt> if it is not '\n' terminated. E.g. if the last line is not terminated
gt> by a newline character, then "read" will read it but return false,
gt> leaving the broken partial line in the read variable(s).
gt> It can also break or adversely affect some text processing tools,
gt> that operate on the file.
gt>
gt> Signed-off-by: grygorii tertychnyi <gtertych at cisco.com>
gt> ---
gt>  meta/lib/oe/utils.py | 2 +-
gt>  1 file changed, 1 insertion(+), 1 deletion(-)

RP> If you enable buildhistory (INHERIT += 'buildhistory' in local.conf)
RP> and then "bitbake buildtools-tarball", you'll see:

RP> | DEBUG: Python function buildhistory_list_installed_sdk_target finished
RP> | NOTE: Executing buildhistory_get_sdk_installed_target ...
RP> | DEBUG: Executing shell function buildhistory_get_sdk_installed_target
RP> | basename: missing operand
RP> | Try 'basename --help' for more information.
RP> | WARNING: /home/pokybuild/yocto-worker/nightly-arm/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/buildtools-tarball/1.0-r0/temp/run.buildhistory_get_sdk_installed_target.13414:1 exit 123 from 'xargs -n1 basename > $1/installed-packages.txt'
RP> | DEBUG: Python function do_populate_sdk finished
RP> | ERROR: Function failed: buildhistory_get_sdk_installed_target (log file is located at /home/pokybuild/yocto-worker/nightly-arm/build/build/tmp/work/x86_64-nativesdk-pokysdk-linux/buildtools-tarball/1.0-r0/temp/log.do_populate_sdk.13414)

RP> which is buildhistory choking on the blank line.

Reworked in v2. Now it is built.



More information about the Openembedded-core mailing list