1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 05:29:32 +00:00

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>
This commit is contained in:
Michael Wood
2015-12-07 18:23:32 +00:00
committed by Richard Purdie
parent c80b7dfee2
commit 32048fa71f
+6
View File
@@ -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