summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/models.py
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-12-07 18:23:32 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-10 13:29:18 +0000
commit32048fa71f596c31cfc3b9c75ed0af098e711ff4 (patch)
tree0b3baf342b9984430ce00f7ed4a9f58c6abf78d8 /bitbake/lib/toaster/orm/models.py
parentc80b7dfee230dc92bb7134620e0e12cc7f925614 (diff)
downloadpoky-32048fa71f596c31cfc3b9c75ed0af098e711ff4.tar.gz
bitbake: toaster: orm Add convenience method to get all pkgs in a CustomImageRecipe
Returns a queryset of the all the packages that we expect to have in a CustomImageRecipe. (Bitbake rev: 8b03bbae12ec077151c97579e329d89667040a78) 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.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 874b58ecba..4e790c2dd6 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -1401,6 +1401,12 @@ class CustomImageRecipe(Recipe):
1401 base_recipe = models.ForeignKey(Recipe, related_name='based_on_recipe') 1401 base_recipe = models.ForeignKey(Recipe, related_name='based_on_recipe')
1402 project = models.ForeignKey(Project) 1402 project = models.ForeignKey(Project)
1403 1403
1404 def get_all_packages(self):
1405 """Get the included packages and any appended packages"""
1406 return CustomImagePackage.objects.filter((Q(recipe_appends=self) |
1407 Q(recipe_includes=self)) &
1408 ~Q(recipe_excludes=self))
1409
1404 def generate_recipe_file_contents(self): 1410 def generate_recipe_file_contents(self):
1405 """Generate the contents for the recipe file.""" 1411 """Generate the contents for the recipe file."""
1406 # If we have no excluded packages we only need to _append 1412 # If we have no excluded packages we only need to _append