summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/models.py
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-09-28 21:45:18 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-29 14:11:37 +0100
commit3ff6401723289fb53a2797abd971c25b697822cb (patch)
tree53982bd2b6208c7b4921f16ea54c7c4fbab9f8c3 /bitbake/lib/toaster/orm/models.py
parent8948d04bfd0dc84dda8d6575a7b4ed4ac6e73a15 (diff)
downloadpoky-3ff6401723289fb53a2797abd971c25b697822cb.tar.gz
bitbake: toaster: Add CustomImageRecipe model
This model lists custom image recipes for the project. It is populated when new custom image is created. It holds reference to the base recipe and list of packages included into custom image. For CustomImageRecipes the packages will be copied in and therefore not associated with a build so Remove the requirement for the package to have a Build. co-author: Ed Bartosh <ed.bartosh@linux.intel.com> (Bitbake rev: 33cbf4cd3b4ca47c4901501f5f1eafdfdfdae023) Signed-off-by: Michael Wood <michael.g.wood@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/models.py')
-rw-r--r--bitbake/lib/toaster/orm/models.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index b5c864354d..9790630502 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -551,7 +551,7 @@ class Task_Dependency(models.Model):
551 551
552class Package(models.Model): 552class Package(models.Model):
553 search_allowed_fields = ['name', 'version', 'revision', 'recipe__name', 'recipe__version', 'recipe__license', 'recipe__layer_version__layer__name', 'recipe__layer_version__branch', 'recipe__layer_version__commit', 'recipe__layer_version__local_path', 'installed_name'] 553 search_allowed_fields = ['name', 'version', 'revision', 'recipe__name', 'recipe__version', 'recipe__license', 'recipe__layer_version__layer__name', 'recipe__layer_version__branch', 'recipe__layer_version__commit', 'recipe__layer_version__local_path', 'installed_name']
554 build = models.ForeignKey('Build') 554 build = models.ForeignKey('Build', null=True)
555 recipe = models.ForeignKey('Recipe', null=True) 555 recipe = models.ForeignKey('Recipe', null=True)
556 name = models.CharField(max_length=100) 556 name = models.CharField(max_length=100)
557 installed_name = models.CharField(max_length=100, default='') 557 installed_name = models.CharField(max_length=100, default='')
@@ -1172,6 +1172,15 @@ class ProjectLayer(models.Model):
1172 class Meta: 1172 class Meta:
1173 unique_together = (("project", "layercommit"),) 1173 unique_together = (("project", "layercommit"),)
1174 1174
1175class CustomImageRecipe(models.Model):
1176 name = models.CharField(max_length=100)
1177 base_recipe = models.ForeignKey(Recipe)
1178 packages = models.ManyToManyField(Package)
1179 project = models.ForeignKey(Project)
1180
1181 class Meta:
1182 unique_together = ("name", "project")
1183
1175class ProjectVariable(models.Model): 1184class ProjectVariable(models.Model):
1176 project = models.ForeignKey(Project) 1185 project = models.ForeignKey(Project)
1177 name = models.CharField(max_length=100) 1186 name = models.CharField(max_length=100)