Patchwork [bitbake-devel,33/94] bitbake: dsi: save detailed recipe information

login
register
mail settings
Submitter Alexandru DAMIAN
Date Sept. 24, 2013, 4:52 p.m.
Message ID <62447475bb54806d118d911606a87027c1da5e7b.1380041477.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/58831/
State New
Headers show

Comments

Alexandru DAMIAN - Sept. 24, 2013, 4:52 p.m.
From: Alexandru DAMIAN <alexandru.damian@intel.com>

Code to save the recipe information coming in the dependency
tree. Also marks recipes that generate images.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index b0b56aa..92f1621 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -411,22 +411,24 @@  class BuildInfoHelper(object):
             recipe_info['name'] = pn
             recipe_info['version'] = event._depgraph['pn'][pn]['version']
             recipe_info['layer_version'] = layer_version_obj
-
-            # TODO: dump all this info in the deptree event
-            recipe_info['summary'] = 'Not Available'
-            recipe_info['description'] = 'Not Available'
-            recipe_info['section'] = 'Not Available'
-            recipe_info['license'] = 'Not Available'
+            recipe_info['summary'] = event._depgraph['pn'][pn]['summary']
+            recipe_info['license'] = event._depgraph['pn'][pn]['license']
+            recipe_info['description'] = event._depgraph['pn'][pn]['summary']
+            recipe_info['section'] = event._depgraph['pn'][pn]['section']
             recipe_info['licensing_info'] = 'Not Available'
-            recipe_info['homepage'] = 'Not Available'
-            recipe_info['bugtracker'] = 'Not Available'
+            recipe_info['homepage'] = event._depgraph['pn'][pn]['homepage']
+            recipe_info['bugtracker'] = event._depgraph['pn'][pn]['bugtracker']
             recipe_info['author'] = 'Not Available'
             recipe_info['file_path'] = file_name
             recipe = self.orm_wrapper.get_update_recipe_object(recipe_info)
+            recipe.is_image = True in map(lambda x: x.endswith('image.bbclass'), event._depgraph['pn'][pn]['inherits'])
             self.internal_state['recipes'][pn] = recipe
 
+        # save all task information
         def _save_a_task(taskdesc):
-            pn, taskname = re.split(r'\.', taskdesc);
+            spec = re.split(r'\.', taskdesc);
+            pn = ".".join(spec[0:-1])
+            taskname = spec[-1]
             e = event
             e.taskname = pn
             recipe = self.internal_state['recipes'][pn]