[bitbake-devel] [PATCH 19/22] toaster: tables show all recipes in the layerdetails even duplicates

brian avery avery.brian at gmail.com
Tue Sep 29 04:45:29 UTC 2015


From: Michael Wood <michael.g.wood at intel.com>

For some layers we have multiple recipes for the same software with
differing versions. Change to showing all versions and add a version
column to the table instead.

Signed-off-by: Michael Wood <michael.g.wood at intel.com>
Signed-off-by: brian avery <avery.brian at gmail.com>
---
 lib/toaster/toastergui/tables.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/toaster/toastergui/tables.py b/lib/toaster/toastergui/tables.py
index 1526d59..3354072 100644
--- a/lib/toaster/toastergui/tables.py
+++ b/lib/toaster/toastergui/tables.py
@@ -403,8 +403,8 @@ class LayerRecipesTable(RecipesTable):
 
 
     def setup_queryset(self, *args, **kwargs):
-        RecipesTable.setup_queryset(self, *args, **kwargs)
-        self.queryset = self.queryset.filter(layer_version__pk=int(kwargs['layerid']))
+        self.queryset = \
+                Recipe.objects.filter(layer_version__pk=int(kwargs['layerid']))
 
         self.static_context_extra['in_prj'] = ProjectLayer.objects.filter(Q(project=kwargs['pid']) & Q(layercommit=kwargs['layerid'])).count()
 
@@ -418,6 +418,8 @@ class LayerRecipesTable(RecipesTable):
         self.add_column(title="Description",
                         field_name="get_description_or_summary")
 
+        self.add_column(title="Version",
+                        field_name="version")
 
         build_recipe_template ='<button class="btn btn-block build-recipe-btn" data-recipe-name="{{data.name}}" {%if extra.in_prj == 0 %}disabled="disabled"{%endif%}>Build recipe</button>'
 
-- 
1.9.1




More information about the bitbake-devel mailing list