summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-03-23 08:28:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-23 17:53:56 +0000
commit1d1aaa2f561a18e10314e8ed07b616c11b1286ae (patch)
treead1e57e626b48f17d4944f16110040c787b6cd02 /bitbake
parent5c49230deb4b7b791e4cdd3c66ed7945fc7743c4 (diff)
downloadpoky-1d1aaa2f561a18e10314e8ed07b616c11b1286ae.tar.gz
bitbake: toaster: orm generate CustomImageRecipe contents try secondary path
Try a secondary file path if the first does not exist. When we get the recipe paths and layer information from the layer index it is not a complete path but we are usually able to reconstruct it. If the complete real path has been discovered by building then use this instead. [YOCTO #9206] (Bitbake rev: 238db2e03405d259d48dfc477a276191e6a47698) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/orm/models.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 0aad788c2a..08b1a7ca0d 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -1534,10 +1534,13 @@ class CustomImageRecipe(Recipe):
1534 packages_conf += pkg.name+' ' 1534 packages_conf += pkg.name+' '
1535 1535
1536 packages_conf += "\"" 1536 packages_conf += "\""
1537 1537 try:
1538 base_recipe = open("%s/%s" % 1538 base_recipe = open("%s/%s" %
1539 (self.base_recipe.layer_version.dirpath, 1539 (self.base_recipe.layer_version.dirpath,
1540 self.base_recipe.file_path), 'r').read() 1540 self.base_recipe.file_path), 'r').read()
1541 except IOError:
1542 # The path may now be the full path if the recipe has been built
1543 base_recipe = open(self.base_recipe.file_path, 'r').read()
1541 1544
1542 # Add a special case for when the recipe we have based a custom image 1545 # Add a special case for when the recipe we have based a custom image
1543 # recipe on requires another recipe. 1546 # recipe on requires another recipe.