From 32048fa71f596c31cfc3b9c75ed0af098e711ff4 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Mon, 7 Dec 2015 18:23:32 +0000 Subject: 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 Signed-off-by: brian avery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bitbake/lib/toaster/orm') 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): base_recipe = models.ForeignKey(Recipe, related_name='based_on_recipe') project = models.ForeignKey(Project) + def get_all_packages(self): + """Get the included packages and any appended packages""" + return CustomImagePackage.objects.filter((Q(recipe_appends=self) | + Q(recipe_includes=self)) & + ~Q(recipe_excludes=self)) + def generate_recipe_file_contents(self): """Generate the contents for the recipe file.""" # If we have no excluded packages we only need to _append -- cgit v1.2.3-54-g00ecf