diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-04-14 14:53:14 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-04-15 06:59:43 +0100 |
commit | 9ec95575e455eaa52bd5f05238cd3b13ac984df3 (patch) | |
tree | 8c3a696df578046c7e1c123b5b0ef847afe348f3 /meta/classes | |
parent | 7f9d01eb177021c022230ca15c293948faa1d962 (diff) | |
download | poky-9ec95575e455eaa52bd5f05238cd3b13ac984df3.tar.gz |
buildstats: Fix tracebacks for early task failures
If a failure occurs early in the task, its possible we can have a
TaskFailed before the TaskStarted event can be triggered. This in
turn causes another traceback as the directory buildstats writes
files into doesn't exist.
Ensure the directory exists so we can see the original error.
(From OE-Core rev: bd0a65ec47ebf55c549c9ef276b201b72396ce2b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/buildstats.bbclass | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass index 2d63589e4b..34ecb03861 100644 --- a/meta/classes/buildstats.bbclass +++ b/meta/classes/buildstats.bbclass | |||
@@ -167,6 +167,8 @@ python run_buildstats () { | |||
167 | f.write("Uncompressed Rootfs size: %s" % rootfs_size) | 167 | f.write("Uncompressed Rootfs size: %s" % rootfs_size) |
168 | 168 | ||
169 | elif isinstance(e, bb.build.TaskFailed): | 169 | elif isinstance(e, bb.build.TaskFailed): |
170 | # Can have a failure before TaskStarted so need to mkdir here too | ||
171 | bb.utils.mkdirhier(taskdir) | ||
170 | write_task_data("failed", os.path.join(taskdir, e.task), e, d) | 172 | write_task_data("failed", os.path.join(taskdir, e.task), e, d) |
171 | ######################################################################## | 173 | ######################################################################## |
172 | # Lets make things easier and tell people where the build failed in | 174 | # Lets make things easier and tell people where the build failed in |