[bitbake-devel] [PATCH 90/94] bitbake: webhob: store and display layer priorities

Alex DAMIAN alexandru.damian at intel.com
Tue Sep 24 16:52:59 UTC 2013


From: Alexandru DAMIAN <alexandru.damian at intel.com>

Recording layer version priorities based on the information
sent with the dependency tree. The layer versions are already
created, just need to update the layer priority info.

Modifying the Simple interface to display the layer priorities.

[YOCTO #5218]

Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py               | 7 +++++++
 bitbake/lib/webhob/bldviewer/templates/layer.html  | 2 +-
 bitbake/lib/webhob/bldviewer/templates/recipe.html | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 7f0086e..c8820a5 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -547,6 +547,13 @@ class BuildInfoHelper(object):
 
 
     def store_dependency_information(self, event):
+        # save layer version priorities
+        for lv in event._depgraph['layer-priorities']:
+            (name, path, regexp, priority) = lv
+            layer_version_obj = self._get_layer_version_for_path(path[1:]) # paths start with a ^
+            assert layer_version_obj is not None
+            layer_version_obj.priority = priority
+            layer_version_obj.save()
 
         # save build time package information
         self.internal_state['bldpkgs'] = {}
diff --git a/bitbake/lib/webhob/bldviewer/templates/layer.html b/bitbake/lib/webhob/bldviewer/templates/layer.html
index 508f254..374a0f9 100644
--- a/bitbake/lib/webhob/bldviewer/templates/layer.html
+++ b/bitbake/lib/webhob/bldviewer/templates/layer.html
@@ -23,7 +23,7 @@
             <td><table>
             {% for lv in layer.versions %}
                 <tr><td>
-        <a href="/simple/layerversions/{{lv.id}}/recipes">{{lv.branch}}:{{lv.commit}} ({{lv.count}} recipes)</a>
+        <a href="/simple/layerversions/{{lv.id}}/recipes">({{lv.priority}}){{lv.branch}}:{{lv.commit}} ({{lv.count}} recipes)</a>
                 </td></tr>
             {% endfor %}
             </table></td>
diff --git a/bitbake/lib/webhob/bldviewer/templates/recipe.html b/bitbake/lib/webhob/bldviewer/templates/recipe.html
index e81883f..ec8a46d 100644
--- a/bitbake/lib/webhob/bldviewer/templates/recipe.html
+++ b/bitbake/lib/webhob/bldviewer/templates/recipe.html
@@ -2,7 +2,7 @@
 
 {% block pagename %}
 <ul class="nav nav-tabs" style="display: inline-block">
-  <li><a>Layer  {{layer_version.layer.name}}&nbsp;:&nbsp;{{layer_version.branch}}&nbsp;:&nbsp;{{layer_version.commit}}</a></li>
+  <li><a>Layer  {{layer_version.layer.name}}&nbsp;:&nbsp;{{layer_version.branch}}&nbsp;:&nbsp;{{layer_version.commit}}&nbsp;:&nbsp;{{layer_version.priority}}</a></li>
 </ul>
     <h1>Toaster - Recipes for a Layer</h1>
 {% endblock %}
-- 
1.8.1.2




More information about the bitbake-devel mailing list