[oe-commits] [bitbake] 02/02: lib/bb/build.py: decode the command as UTF-8
git at git.openembedded.org
git at git.openembedded.org
Tue Jul 19 07:47:58 UTC 2016
rpurdie pushed a commit to branch master
in repository bitbake.
commit 42d727743fa599e0a3c5ad2c29a1e6ede1a918bb
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Fri Jul 15 11:25:42 2016 +0100
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 ]
Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/build.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 4fb2a77..04979ac 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -377,8 +377,11 @@ exit $ret
def readfifo(data):
lines = data.split(b'\0')
for line in lines:
+ # Just skip empty commands
+ if not line:
+ continue
splitval = line.split(b' ', 1)
- cmd = splitval[0]
+ cmd = splitval[0].decode("utf-8")
if len(splitval) > 1:
value = splitval[1].decode("utf-8")
else:
@@ -402,7 +405,8 @@ exit $ret
level = int(splitval[0])
value = splitval[1]
bb.debug(level, value)
-
+ else:
+ bb.warn("Unrecognised command '%s' on FIFO" % cmd)
tempdir = d.getVar('T', True)
fifopath = os.path.join(tempdir, 'fifo.%s' % os.getpid())
if os.path.exists(fifopath):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list