From 971d65c614ea2265951262f7acb7037d090c1c4a Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Mon, 14 Dec 2015 18:45:02 +0000 Subject: bitbake: toaster: localhostbectrl Update the dirpath of customrecipe's base layer We need to know the location of the based_on recipe's layer on the file system before we try and generate the custom image recipe. As we read the recipe to make the custom version. (Bitbake rev: e6a7cacbddd1df5bac0b79384199cf7264c5bbd5) Signed-off-by: Michael Wood Signed-off-by: brian avery Signed-off-by: Richard Purdie --- .../lib/toaster/bldcontrol/localhostbecontroller.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'bitbake/lib/toaster') diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index 8acf013476..a7db1efc65 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py @@ -239,6 +239,25 @@ class LocalhostBEController(BuildEnvironmentController): with open(config, "w") as conf: conf.write('BBPATH .= ":${LAYERDIR}"\nBBFILES += "${LAYERDIR}/recipes/*.bb"\n') + # Update the Layer_Version dirpath that has our base_recipe in + # to be able to read the base recipe to then generate the + # custom recipe. + br_layer_base_recipe = layers.get( + layer_version=customrecipe.base_recipe.layer_version) + + br_layer_base_dirpath = \ + os.path.join(self.be.sourcedir, + self.getGitCloneDirectory( + br_layer_base_recipe.giturl, + br_layer_base_recipe.commit), + customrecipe.base_recipe.layer_version.dirpath + ) + + customrecipe.base_recipe.layer_version.dirpath = \ + br_layer_base_dirpath + + customrecipe.base_recipe.layer_version.save() + # create recipe recipe_path = \ os.path.join(layerpath, "recipes", "%s.bb" % target.target) -- cgit v1.2.3-54-g00ecf