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 <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Wood 2015-12-14 18:45:02 +00:00 committed by Richard Purdie
parent 6d9f342e12
commit 971d65c614
1 changed files with 19 additions and 0 deletions

View File

@ -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)