From 481dc1154709d9d1061de259d7133335c7497051 Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Thu, 21 Jan 2016 17:11:11 +0000 Subject: bitbake: toaster: make locale packages uneditable in custom image page When the packages associated with a custom image recipe are shown in the customrecipe editing page, locale packages are shown in the same way as all other packages. This gives the false impression that these packages can be removed, when in fact they are automatically added due to the IMAGE_LINGUAS build variable. Modify the customrecipe page so that locale packages cannot be removed, and provide some help text explaining why. [YOCTO #8927] (Bitbake rev: b2208e53c00a67a7d0345e7378e6806b8ae40fb4) Signed-off-by: Elliot Smith Signed-off-by: brian avery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/tables.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/toaster/toastergui/tables.py') diff --git a/bitbake/lib/toaster/toastergui/tables.py b/bitbake/lib/toaster/toastergui/tables.py index b73f459b2c..b906718b66 100644 --- a/bitbake/lib/toaster/toastergui/tables.py +++ b/bitbake/lib/toaster/toastergui/tables.py @@ -765,12 +765,27 @@ class SelectPackagesTable(PackagesTable): def setup_columns(self, *args, **kwargs): super(SelectPackagesTable, self).setup_columns(*args, **kwargs) + add_remove_template = ''' + {% if data.is_locale_package %} +

+ Locale package + +

+ {% else %} + {% include "pkg_add_rm_btn.html" %} + {% endif %} + ''' + self.add_column(title="Add | Remove", hideable=False, help_text="Use the add and remove buttons to modify " "the package content of your custom image", static_data_name="add_rm_pkg_btn", - static_data_template='{% include "pkg_add_rm_btn.html" %}', + static_data_template=add_remove_template, filter_name='in_current_image_filter') def setup_filters(self, *args, **kwargs): -- cgit v1.2.3-54-g00ecf