summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-14 14:53:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-15 06:57:48 +0100
commitbd0a65ec47ebf55c549c9ef276b201b72396ce2b (patch)
tree0a94773831b24e70e2534ea4f636bed21acd2b27
parente5c43dc7f1e17f360b5dc762045ccf7895d18843 (diff)
downloadopenembedded-core-contrib-bd0a65ec47ebf55c549c9ef276b201b72396ce2b.tar.gz
openembedded-core-contrib-bd0a65ec47ebf55c549c9ef276b201b72396ce2b.tar.bz2
openembedded-core-contrib-bd0a65ec47ebf55c549c9ef276b201b72396ce2b.zip
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/buildstats.bbclass2
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 () {
f.write("Uncompressed Rootfs size: %s" % rootfs_size)
elif isinstance(e, bb.build.TaskFailed):
+ # Can have a failure before TaskStarted so need to mkdir here too
+ bb.utils.mkdirhier(taskdir)
write_task_data("failed", os.path.join(taskdir, e.task), e, d)
########################################################################
# Lets make things easier and tell people where the build failed in