[oe-commits] [bitbake] 05/08: toaster: orm generate CustomImageRecipe contents try secondary path

git at git.openembedded.org git at git.openembedded.org
Wed Mar 23 17:56:57 UTC 2016


rpurdie pushed a commit to branch master
in repository bitbake.

commit 238db2e03405d259d48dfc477a276191e6a47698
Author: Michael Wood <michael.g.wood at intel.com>
AuthorDate: Wed Mar 23 08:28:40 2016 +0000

    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]
    
    Signed-off-by: Michael Wood <michael.g.wood at intel.com>
    Signed-off-by: Elliot Smith <elliot.smith at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/toaster/orm/models.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 0aad788..08b1a7c 100644
--- a/lib/toaster/orm/models.py
+++ b/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.

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list