[Toaster] [PATCH 3/5] toaster: when updating task stats, task must exist

Elliot Smith elliot.smith at intel.com
Fri Feb 19 06:49:11 PST 2016


Ensure that a task exists when we're updating its buildstats.
This is to prevent duplicate tasks being created when
updating buildstats (which is what was happening before,
causing the buildstats to be attached to tasks which weren't
associated with the build).

[YOCTO #8842]

Signed-off-by: Elliot Smith <elliot.smith at intel.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 2b5d312..5f079d1 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -1109,7 +1109,8 @@ class BuildInfoHelper(object):
             task_information['disk_io'] = taskstats['disk_io']
             if 'elapsed_time' in taskstats:
                 task_information['elapsed_time'] = taskstats['elapsed_time']
-            self.orm_wrapper.get_update_task_object(task_information)
+
+            self.orm_wrapper.get_update_task_object(task_information, True)
 
     def update_and_store_task(self, event):
         assert 'taskfile' in vars(event)
-- 
Elliot Smith
Software Engineer
Intel OTC

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



More information about the toaster mailing list