summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/localhostbecontroller.py')
-rw-r--r--bitbake/lib/toaster/bldcontrol/localhostbecontroller.py25
1 files changed, 18 insertions, 7 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index 11335ac393..18870d9612 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -228,13 +228,22 @@ class LocalhostBEController(BuildEnvironmentController):
228 br_layer_base_recipe = layers.get( 228 br_layer_base_recipe = layers.get(
229 layer_version=customrecipe.base_recipe.layer_version) 229 layer_version=customrecipe.base_recipe.layer_version)
230 230
231 br_layer_base_dirpath = \ 231 # If the layer is one that we've cloned we know where it lives
232 os.path.join(self.be.sourcedir, 232 if br_layer_base_recipe.giturl and br_layer_base_recipe.commit:
233 self.getGitCloneDirectory( 233 layer_path = self.getGitCloneDirectory(
234 br_layer_base_recipe.giturl, 234 br_layer_base_recipe.giturl,
235 br_layer_base_recipe.commit), 235 br_layer_base_recipe.commit)
236 customrecipe.base_recipe.layer_version.dirpath 236 # Otherwise it's a local layer
237 ) 237 elif br_layer_base_recipe.local_source_dir:
238 layer_path = br_layer_base_recipe.local_source_dir
239 else:
240 logger.error("Unable to workout the dir path for the custom"
241 " image recipe")
242
243 br_layer_base_dirpath = os.path.join(
244 self.be.sourcedir,
245 layer_path,
246 customrecipe.base_recipe.layer_version.dirpath)
238 247
239 customrecipe.base_recipe.layer_version.dirpath = \ 248 customrecipe.base_recipe.layer_version.dirpath = \
240 br_layer_base_dirpath 249 br_layer_base_dirpath
@@ -249,6 +258,8 @@ class LocalhostBEController(BuildEnvironmentController):
249 258
250 # Update the layer and recipe objects 259 # Update the layer and recipe objects
251 customrecipe.layer_version.dirpath = layerpath 260 customrecipe.layer_version.dirpath = layerpath
261 customrecipe.layer_version.layer.local_source_dir = layerpath
262 customrecipe.layer_version.layer.save()
252 customrecipe.layer_version.save() 263 customrecipe.layer_version.save()
253 264
254 customrecipe.file_path = recipe_path 265 customrecipe.file_path = recipe_path