[oe-commits] [openembedded-core] 09/11: buildstats: Fix tracebacks for early task failures

git at git.openembedded.org git at git.openembedded.org
Fri Apr 15 06:00:42 UTC 2016


rpurdie pushed a commit to branch krogoth
in repository openembedded-core.

commit bd0a65ec47ebf55c549c9ef276b201b72396ce2b
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Thu Apr 14 14:53:14 2016 +0100

    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 at linuxfoundation.org>
---
 meta/classes/buildstats.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index 2d63589..34ecb03 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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list