]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: localhostbectrl Update the dirpath of customrecipe's base layer
authorMichael Wood <michael.g.wood@intel.com>
Mon, 14 Dec 2015 18:45:02 +0000 (18:45 +0000)
committerMichael Wood <michael.g.wood@intel.com>
Mon, 8 Feb 2016 17:35:47 +0000 (17:35 +0000)
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 <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
lib/toaster/bldcontrol/localhostbecontroller.py

index 8acf013476847151863059b21c7e4e07b46303d4..a7db1efc6557f6bf01726c7b971279b49917e5f1 100644 (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)