From: Michael Wood Date: Wed, 23 Mar 2016 08:28:40 +0000 (+0000) Subject: bitbake: toaster: orm generate CustomImageRecipe contents try secondary path X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1d1aaa2f561a18e10314e8ed07b616c11b1286ae;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: toaster: orm generate CustomImageRecipe contents try secondary path Try a secondary file path if the first does not exist. When we get the recipe paths and layer information from the layer index it is not a complete path but we are usually able to reconstruct it. If the complete real path has been discovered by building then use this instead. [YOCTO #9206] (Bitbake rev: 238db2e03405d259d48dfc477a276191e6a47698) Signed-off-by: Michael Wood Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 0aad788c2a4..08b1a7ca0da 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -1534,10 +1534,13 @@ class CustomImageRecipe(Recipe): packages_conf += pkg.name+' ' packages_conf += "\"" - - base_recipe = open("%s/%s" % - (self.base_recipe.layer_version.dirpath, - self.base_recipe.file_path), 'r').read() + try: + base_recipe = open("%s/%s" % + (self.base_recipe.layer_version.dirpath, + self.base_recipe.file_path), 'r').read() + except IOError: + # The path may now be the full path if the recipe has been built + base_recipe = open(self.base_recipe.file_path, 'r').read() # Add a special case for when the recipe we have based a custom image # recipe on requires another recipe.