mirror of
https://git.yoctoproject.org/poky
synced 2026-04-28 15:32:27 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
e86dc1a182
commit
813c417f26
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user