diff options
author | Awais Belal <awais_belal@mentor.com> | 2018-09-05 22:26:46 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-10 12:15:04 +0100 |
commit | 0b15ee38adf21cca559cd65ecab9c2aaa80dd384 (patch) | |
tree | 09b28cbd1630e53bc0c95abad6bd57518c79113f /bitbake/lib/toaster/orm | |
parent | 1ba6706ce27e8416c962361682d2cdd676de3a2e (diff) | |
download | poky-0b15ee38adf21cca559cd65ecab9c2aaa80dd384.tar.gz |
bitbake: 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]
(Bitbake rev: 30f622dbd874b800c5bbdbeac992dd7783092928)
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>
Diffstat (limited to 'bitbake/lib/toaster/orm')
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 3a7dff8ca6..4b77e8fda8 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
@@ -1663,6 +1663,9 @@ class CustomImageRecipe(Recipe): | |||
1663 | 1663 | ||
1664 | path_schema_two = self.base_recipe.file_path | 1664 | path_schema_two = self.base_recipe.file_path |
1665 | 1665 | ||
1666 | path_schema_three = "%s/%s" % (self.base_recipe.layer_version.layer.local_source_dir, | ||
1667 | self.base_recipe.file_path) | ||
1668 | |||
1666 | if os.path.exists(path_schema_one): | 1669 | if os.path.exists(path_schema_one): |
1667 | return path_schema_one | 1670 | return path_schema_one |
1668 | 1671 | ||
@@ -1670,6 +1673,10 @@ class CustomImageRecipe(Recipe): | |||
1670 | if os.path.exists(path_schema_two): | 1673 | if os.path.exists(path_schema_two): |
1671 | return path_schema_two | 1674 | return path_schema_two |
1672 | 1675 | ||
1676 | # Or a local path if all layers are local | ||
1677 | if os.path.exists(path_schema_three): | ||
1678 | return path_schema_three | ||
1679 | |||
1673 | return None | 1680 | return None |
1674 | 1681 | ||
1675 | def generate_recipe_file_contents(self): | 1682 | def generate_recipe_file_contents(self): |