diff options
author | Elliot Smith <elliot.smith@intel.com> | 2016-01-21 17:11:11 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-10 13:29:20 +0000 |
commit | 481dc1154709d9d1061de259d7133335c7497051 (patch) | |
tree | f18ef043a70a0d31c5e1589b5b44a57a688a0683 /bitbake/lib/toaster/orm | |
parent | a757d397dbc39ca479321263bafcc129451f21f1 (diff) | |
download | poky-481dc1154709d9d1061de259d7133335c7497051.tar.gz |
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 <elliot.smith@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/orm')
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 1cf997cfe5..b70fa18feb 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
@@ -749,6 +749,20 @@ class Package(models.Model): | |||
749 | section = models.CharField(max_length=80, blank=True) | 749 | section = models.CharField(max_length=80, blank=True) |
750 | license = models.CharField(max_length=80, blank=True) | 750 | license = models.CharField(max_length=80, blank=True) |
751 | 751 | ||
752 | @property | ||
753 | def is_locale_package(self): | ||
754 | """ Returns True if this package is identifiable as a locale package """ | ||
755 | if self.name.find('locale') != -1: | ||
756 | return True | ||
757 | return False | ||
758 | |||
759 | @property | ||
760 | def is_packagegroup(self): | ||
761 | """ Returns True is this package is identifiable as a packagegroup """ | ||
762 | if self.name.find('packagegroup') != -1: | ||
763 | return True | ||
764 | return False | ||
765 | |||
752 | class CustomImagePackage(Package): | 766 | class CustomImagePackage(Package): |
753 | # CustomImageRecipe fields to track pacakges appended, | 767 | # CustomImageRecipe fields to track pacakges appended, |
754 | # included and excluded from a CustomImageRecipe | 768 | # included and excluded from a CustomImageRecipe |