Patchwork [bitbake-devel,01/14] toaster: update saving sstate task data

login
register
mail settings
Submitter Alexandru DAMIAN
Date March 31, 2014, 4:47 p.m.
Message ID <2eb6aba6ca24b899b4afe03cb21460d4238e19ed.1396284354.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/69711/
State New
Headers show

Comments

Alexandru DAMIAN - March 31, 2014, 4:47 p.m.
From: Alexandru DAMIAN <alexandru.damian@intel.com>

This is an update on the sstate file saving data.
It saves both found and missed sstate tasks.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 lib/bb/ui/buildinfohelper.py | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

Patch

diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index d1d92c8..0a15579 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -750,7 +750,7 @@  class BuildInfoHelper(object):
 
 
     def store_missed_state_tasks(self, event):
-        for (fn, taskname, taskhash, sstatefile) in event.data:
+        for (fn, taskname, taskhash, sstatefile) in event.data['missed']:
 
             identifier = fn + taskname + "_setscene"
             recipe_information = self._get_recipe_information_from_taskfile(fn)
@@ -769,6 +769,21 @@  class BuildInfoHelper(object):
 
             self.orm_wrapper.get_update_task_object(task_information)
 
+        for (fn, taskname, taskhash, sstatefile) in event.data['found']:
+
+            identifier = fn + taskname + "_setscene"
+            recipe_information = self._get_recipe_information_from_taskfile(fn)
+            recipe = self.orm_wrapper.get_update_recipe_object(recipe_information)
+            class MockEvent: pass
+            event = MockEvent()
+            event.taskname = taskname
+            event.taskhash = taskhash
+            task_information = self._get_task_information(event,recipe)
+
+            task_information['path_to_sstate_obj'] = sstatefile
+
+            self.orm_wrapper.get_update_task_object(task_information)
+
 
     def store_target_package_data(self, event):
         assert 'data' in vars(event)