]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: toaster/models.py: allow local paths for custom recipe's base
authorAwais Belal <awais_belal@mentor.com>
Sun, 26 Aug 2018 22:33:30 +0000 (15:33 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Aug 2018 09:32:08 +0000 (10:32 +0100)
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]

(Bitbake rev: 59f3e04122fca43835603779ac2d201464fbaebf)

Signed-off-by: Awais Belal <awais_belal@mentor.com>
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/toaster/orm/models.py

index 306c4fafa82aee15816d723f2b90e7011106d5f8..be0bda5b153c90b503edbe6a3d287ceaad37cb16 100644 (file)
@@ -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):