diff options
author | Ross Burton <ross.burton@intel.com> | 2016-07-15 11:25:42 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-19 08:47:06 +0100 |
commit | faa726824dfb5bc0141919bb16c0d0069a3da69e (patch) | |
tree | f560372fbb06f2710446ad0c298779ae924ac8a6 /bitbake | |
parent | b7a741cbca043cc17b7e9798531813c932f5c103 (diff) | |
download | poky-faa726824dfb5bc0141919bb16c0d0069a3da69e.tar.gz |
bitbake: lib/bb/build.py: decode the command as UTF-8
The messaging FIFO is UTF-8, so decode the command as UTF-8 as well as the value
as otherwise "bberror" != b("bberror") and none of the messages from shell
functions are ever displayed.
Also add an else to the command parser so unhandled commands are noticed.
[ YOCTO #9947 ]
(Bitbake rev: 42d727743fa599e0a3c5ad2c29a1e6ede1a918bb)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/build.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 4fb2a77cfd..04979acbd3 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -377,8 +377,11 @@ exit $ret | |||
377 | def readfifo(data): | 377 | def readfifo(data): |
378 | lines = data.split(b'\0') | 378 | lines = data.split(b'\0') |
379 | for line in lines: | 379 | for line in lines: |
380 | # Just skip empty commands | ||
381 | if not line: | ||
382 | continue | ||
380 | splitval = line.split(b' ', 1) | 383 | splitval = line.split(b' ', 1) |
381 | cmd = splitval[0] | 384 | cmd = splitval[0].decode("utf-8") |
382 | if len(splitval) > 1: | 385 | if len(splitval) > 1: |
383 | value = splitval[1].decode("utf-8") | 386 | value = splitval[1].decode("utf-8") |
384 | else: | 387 | else: |
@@ -402,7 +405,8 @@ exit $ret | |||
402 | level = int(splitval[0]) | 405 | level = int(splitval[0]) |
403 | value = splitval[1] | 406 | value = splitval[1] |
404 | bb.debug(level, value) | 407 | bb.debug(level, value) |
405 | 408 | else: | |
409 | bb.warn("Unrecognised command '%s' on FIFO" % cmd) | ||
406 | tempdir = d.getVar('T', True) | 410 | tempdir = d.getVar('T', True) |
407 | fifopath = os.path.join(tempdir, 'fifo.%s' % os.getpid()) | 411 | fifopath = os.path.join(tempdir, 'fifo.%s' % os.getpid()) |
408 | if os.path.exists(fifopath): | 412 | if os.path.exists(fifopath): |