aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAwais Belal <awais_belal@mentor.com>2018-09-05 22:26:46 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-10 12:14:54 +0100
commit30f622dbd874b800c5bbdbeac992dd7783092928 (patch)
treed2a5511cf2e53fbe1cfb2f5b18f56351fb8ce5da
parent87060a84e74125be10db062da3032e9b01f5dc96 (diff)
downloadbitbake-30f622dbd874b800c5bbdbeac992dd7783092928.tar.gz
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@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/toaster/orm/models.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
index 3a7dff8ca..4b77e8fda 100644
--- a/lib/toaster/orm/models.py
+++ b/lib/toaster/orm/models.py
@@ -1663,6 +1663,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
@@ -1670,6 +1673,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):