aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-07-27 13:55:52 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-27 12:26:57 +0100
commit03d01393d14b7b20dcb40ff89b1628883fd3b545 (patch)
tree12686718f080bca0dc7dad1cf37de91fb4e24b31
parentf6e47aa9b12f9ab61530c40e0343f451699d9077 (diff)
downloadopenembedded-core-contrib-03d01393d14b7b20dcb40ff89b1628883fd3b545.tar.gz
openembedded-core-contrib-03d01393d14b7b20dcb40ff89b1628883fd3b545.tar.bz2
openembedded-core-contrib-03d01393d14b7b20dcb40ff89b1628883fd3b545.zip
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 ':' -> '::' 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.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index eeca9dedd25..d63cff532ee 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -192,7 +192,7 @@ python toaster_collect_task_stats() {
bn = get_bn(e)
bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
taskdir = os.path.join(bsdir, e.data.expand("${PF}"))
- fout.write("%s:%s:%s:%s\n" % (e.taskfile, e.taskname, os.path.join(taskdir, e.task), e.data.expand("${PN}")))
+ fout.write("%s::%s::%s::%s\n" % (e.taskfile, e.taskname, os.path.join(taskdir, e.task), e.data.expand("${PN}")))
bb.utils.unlockfile(lock)
@@ -245,7 +245,7 @@ python toaster_collect_task_stats() {
events = []
with open(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist"), "r") as fin:
for line in fin:
- (taskfile, taskname, filename, recipename) = line.strip().split(":")
+ (taskfile, taskname, filename, recipename) = line.strip().split("::")
events.append((taskfile, taskname, _read_stats(filename), recipename))
bb.event.fire(bb.event.MetadataEvent("BuildStatsList", events), e.data)
os.unlink(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist"))