diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-07-27 13:55:52 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-27 12:28:00 +0100 |
commit | 813c417f266183e626d3437904943f8545be0eeb (patch) | |
tree | bb03f1742a9d9468f32acbb836370b3de8b1a3f2 | |
parent | e86dc1a18222142a20913ebe79feab58dc668aca (diff) | |
download | poky-813c417f266183e626d3437904943f8545be0eeb.tar.gz |
toaster.bbclass: Fix ValueError
Running "bitbake xxx:do_unpack" resulted in exception at the
BuildCompleted event from toaster.
The reason for this exception was usage of ':' as a field
delimiter in toasterstatlist file. As target can optionally
contain ':<task>' suffix it caused split(':') to throw exception:
File "toaster_collect_task_stats(e)", line 71, in
toaster_collect_task_stats(e=<bb.event.BuildCompleted object at
0x7f8434deed50>)
ValueError: too many values to unpack
Fixed by changing delimiter ':' -> '::'
(From OE-Core rev: 03d01393d14b7b20dcb40ff89b1628883fd3b545)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/toaster.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass index eeca9dedd2..d63cff532e 100644 --- a/meta/classes/toaster.bbclass +++ b/meta/classes/toaster.bbclass | |||
@@ -192,7 +192,7 @@ python toaster_collect_task_stats() { | |||
192 | bn = get_bn(e) | 192 | bn = get_bn(e) |
193 | bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn) | 193 | bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn) |
194 | taskdir = os.path.join(bsdir, e.data.expand("${PF}")) | 194 | taskdir = os.path.join(bsdir, e.data.expand("${PF}")) |
195 | fout.write("%s:%s:%s:%s\n" % (e.taskfile, e.taskname, os.path.join(taskdir, e.task), e.data.expand("${PN}"))) | 195 | fout.write("%s::%s::%s::%s\n" % (e.taskfile, e.taskname, os.path.join(taskdir, e.task), e.data.expand("${PN}"))) |
196 | 196 | ||
197 | bb.utils.unlockfile(lock) | 197 | bb.utils.unlockfile(lock) |
198 | 198 | ||
@@ -245,7 +245,7 @@ python toaster_collect_task_stats() { | |||
245 | events = [] | 245 | events = [] |
246 | with open(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist"), "r") as fin: | 246 | with open(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist"), "r") as fin: |
247 | for line in fin: | 247 | for line in fin: |
248 | (taskfile, taskname, filename, recipename) = line.strip().split(":") | 248 | (taskfile, taskname, filename, recipename) = line.strip().split("::") |
249 | events.append((taskfile, taskname, _read_stats(filename), recipename)) | 249 | events.append((taskfile, taskname, _read_stats(filename), recipename)) |
250 | bb.event.fire(bb.event.MetadataEvent("BuildStatsList", events), e.data) | 250 | bb.event.fire(bb.event.MetadataEvent("BuildStatsList", events), e.data) |
251 | os.unlink(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist")) | 251 | os.unlink(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist")) |