[oe-commits] [bitbake] 07/10: toaster/models.py: allow local paths for custom recipe's base

git at git.openembedded.org git at git.openembedded.org
Mon Aug 27 23:05:28 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 59f3e04122fca43835603779ac2d201464fbaebf
Author: Awais Belal <awais_belal at mentor.com>
AuthorDate: Sun Aug 26 15:33:30 2018 -0700

    toaster/models.py: allow local paths for custom recipe's base
    
    In a case where the layer source is local only and the recipe
    is not yet built, we can search for the path with layer's
    local_source_dir, and if available that should be used rather
    than just skipping the scenario.
    
    [YOCTO #12891]
    
    Signed-off-by: Awais Belal <awais_belal at mentor.com>
    Signed-off-by: David Reyna <David.Reyna at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/toaster/orm/models.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 306c4fa..be0bda5 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -1712,6 +1712,9 @@ class CustomImageRecipe(Recipe):
 
         path_schema_two = self.base_recipe.file_path
 
+        path_schema_three = "%s/%s" % (self.base_recipe.layer_version.layer.local_source_dir,
+                                     self.base_recipe.file_path)
+
         if os.path.exists(path_schema_one):
             return path_schema_one
 
@@ -1719,6 +1722,10 @@ class CustomImageRecipe(Recipe):
         if os.path.exists(path_schema_two):
             return path_schema_two
 
+        # Or a local path if all layers are local
+        if os.path.exists(path_schema_three):
+            return path_schema_three
+
         return None
 
     def generate_recipe_file_contents(self):

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


More information about the Openembedded-commits mailing list