]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: make a workaround for old style index
authorEd Bartosh <ed.bartosh@linux.intel.com>
Tue, 29 Sep 2015 04:45:11 +0000 (21:45 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Sep 2015 12:44:47 +0000 (13:44 +0100)
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>
lib/toaster/orm/models.py

index 883ecf4e503695f49d98ff31e7f47f02177a2ba1..b5c864354d2b3eaf2fc568741264d971b375e88d 100644 (file)
@@ -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']))