diff options
author | Awais Belal <awais_belal@mentor.com> | 2018-08-26 15:33:30 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-28 10:32:08 +0100 |
commit | 876450442b06779be1ec5f393ccc3c5044beabb5 (patch) | |
tree | c56d7493c946c64c9b5b0f6c7379be96172630a5 /bitbake/lib/toaster/orm | |
parent | 3b7ec343713f747837587f6fec743af83e82003f (diff) | |
download | poky-876450442b06779be1ec5f393ccc3c5044beabb5.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: 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>
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 306c4fafa8..be0bda5b15 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
@@ -1712,6 +1712,9 @@ class CustomImageRecipe(Recipe): | |||
1712 | 1712 | ||
1713 | path_schema_two = self.base_recipe.file_path | 1713 | path_schema_two = self.base_recipe.file_path |
1714 | 1714 | ||
1715 | path_schema_three = "%s/%s" % (self.base_recipe.layer_version.layer.local_source_dir, | ||
1716 | self.base_recipe.file_path) | ||
1717 | |||
1715 | if os.path.exists(path_schema_one): | 1718 | if os.path.exists(path_schema_one): |
1716 | return path_schema_one | 1719 | return path_schema_one |
1717 | 1720 | ||
@@ -1719,6 +1722,10 @@ class CustomImageRecipe(Recipe): | |||
1719 | if os.path.exists(path_schema_two): | 1722 | if os.path.exists(path_schema_two): |
1720 | return path_schema_two | 1723 | return path_schema_two |
1721 | 1724 | ||
1725 | # Or a local path if all layers are local | ||
1726 | if os.path.exists(path_schema_three): | ||
1727 | return path_schema_three | ||
1728 | |||
1722 | return None | 1729 | return None |
1723 | 1730 | ||
1724 | def generate_recipe_file_contents(self): | 1731 | def generate_recipe_file_contents(self): |