From e1851fe04c812d226b0d612732c0579a2bd83822 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Mon, 28 Sep 2015 21:45:11 -0700 Subject: bitbake: toaster: make a workaround for old style index For a new style indexes 'inherits' field is used to determine if recipe is an image recipe. As old style indexes don't have 'inherits' field this can be guessed from recipe name. Let's consider recipe an image recipe if recipe name contains '-image-'. (Bitbake rev: d769d3f54faaf1a3091b1eb6ed1d17a8a108210a) Signed-off-by: Ed Bartosh Signed-off-by: brian avery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bitbake') diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 883ecf4e50..b5c864354d 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -974,6 +974,8 @@ class LayerIndexLayerSource(LayerSource): ro.file_path = ri['filepath'] + "/" + ri['filename'] if 'inherits' in ri: ro.is_image = 'image' in ri['inherits'].split() + else: # workaround for old style layer index + ro.is_image = "-image-" in ri['pn'] ro.save() except IntegrityError as e: logger.debug("Failed saving recipe, ignoring: %s (%s:%s)" % (e, ro.layer_version, ri['filepath']+"/"+ri['filename'])) -- cgit v1.2.3-54-g00ecf