summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-09-28 21:45:11 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-29 13:44:47 +0100
commitd769d3f54faaf1a3091b1eb6ed1d17a8a108210a (patch)
treeef21f9e242a6301e167fa9092b19de8039431b80
parent851e53a216682fc9133f51c05a24527cfc677741 (diff)
downloadbitbake-d769d3f54faaf1a3091b1eb6ed1d17a8a108210a.zip
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-'. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/toaster/orm/models.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 883ecf4e..b5c86435 100644
--- a/lib/toaster/orm/models.py
+++ b/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']))