From: Michael Wood Date: Mon, 14 Dec 2015 18:45:02 +0000 (+0000) Subject: toaster: localhostbectrl Update the dirpath of customrecipe's base layer X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e6a7cacbddd1df5bac0b79384199cf7264c5bbd5;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Michael Wood Signed-off-by: brian avery --- diff --git a/lib/toaster/bldcontrol/localhostbecontroller.py b/lib/toaster/bldcontrol/localhostbecontroller.py index 8acf0134768..a7db1efc655 100644 --- a/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/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)