summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/tables.py
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-01-15 13:00:46 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-15 16:29:59 +0000
commit417f1d3f5306c668e30f2223048b542a46dd5d59 (patch)
tree8523bf84d908b51745469e83623238fa8c50c83e /bitbake/lib/toaster/toastergui/tables.py
parentc02ee05857b67efe879848f379a7e8442c928770 (diff)
downloadpoky-417f1d3f5306c668e30f2223048b542a46dd5d59.tar.gz
bitbake: toaster: check inferred file suffixes against list of known types
The algorithm for finding the suffix for image files produced by the build doesn't reference a list of known file suffixes, so could be prone to error. Modify how file suffixes are parsed from the file path so that they are compared against a list of known types; if this fails, use the part of the basename of the file path after the first '.' character. Also rationalise the places in the views code where we extract the file name extensions for builds, so they both use the same algorithm (before, the same code was duplicated in two places). [YOCTO #8417] (Bitbake rev: dd1c509696b8ab5e593cc64637060a58e95fcd1f) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/tables.py')
-rw-r--r--bitbake/lib/toaster/toastergui/tables.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py
index e5cab48c48..cc9b5aef40 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -661,7 +661,7 @@ class ProjectsTable(ToasterTable):
661 661
662 self.queryset = queryset 662 self.queryset = queryset
663 663
664 # columns: last activity on (updated) - DEFAULT, project (name), release, machine, number of builds, last build outcome, recipe (name), errors, warnings, image files 664 # columns: last activity on (updated) - DEFAULT, project (name), release, machine, number of builds, last build outcome, recipe (name), errors, warnings, image files
665 def setup_columns(self, *args, **kwargs): 665 def setup_columns(self, *args, **kwargs):
666 name_template = ''' 666 name_template = '''
667 {% load project_url_tag %} 667 {% load project_url_tag %}
@@ -767,10 +767,9 @@ class ProjectsTable(ToasterTable):
767 ''' 767 '''
768 768
769 image_files_template = ''' 769 image_files_template = '''
770 {% load projecttags %}
771 {% if data.get_number_of_builds > 0 and data.get_last_outcome == extra.Build.SUCCEEDED %} 770 {% if data.get_number_of_builds > 0 and data.get_last_outcome == extra.Build.SUCCEEDED %}
772 <a href="{% url "builddashboard" data.get_last_build_id %}#images"> 771 <a href="{% url "builddashboard" data.get_last_build_id %}#images">
773 {{fstypes | get_dict_value:data.id}} 772 {{data.get_last_build_extensions}}
774 </a> 773 </a>
775 {% endif %} 774 {% endif %}
776 ''' 775 '''
@@ -848,7 +847,8 @@ class ProjectsTable(ToasterTable):
848 static_data_template=warnings_template) 847 static_data_template=warnings_template)
849 848
850 self.add_column(title='Image files', 849 self.add_column(title='Image files',
851 help_text='', 850 help_text='The root file system types produced by \
851 the last project build',
852 hideable=True, 852 hideable=True,
853 orderable=False, 853 orderable=False,
854 static_data_name='image_files', 854 static_data_name='image_files',