diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index 6bdd743b8b..5df22909d0 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | |||
@@ -222,9 +222,21 @@ class LocalhostBEController(BuildEnvironmentController): | |||
222 | self.setCloneStatus(bitbake,'complete',clone_total,clone_count,'') | 222 | self.setCloneStatus(bitbake,'complete',clone_total,clone_count,'') |
223 | logger.debug("localhostbecontroller: current layer list %s " % pformat(layerlist)) | 223 | logger.debug("localhostbecontroller: current layer list %s " % pformat(layerlist)) |
224 | 224 | ||
225 | if self.pokydirname is None and os.path.exists(os.path.join(self.be.sourcedir, "oe-init-build-env")): | 225 | # Resolve self.pokydirname if not resolved yet, consider the scenario |
226 | logger.debug("localhostbecontroller: selected poky dir name %s" % self.be.sourcedir) | 226 | # where all layers are local, that's the else clause |
227 | self.pokydirname = self.be.sourcedir | 227 | if self.pokydirname is None: |
228 | if os.path.exists(os.path.join(self.be.sourcedir, "oe-init-build-env")): | ||
229 | logger.debug("localhostbecontroller: selected poky dir name %s" % self.be.sourcedir) | ||
230 | self.pokydirname = self.be.sourcedir | ||
231 | else: | ||
232 | # Alternatively, scan local layers for relative "oe-init-build-env" location | ||
233 | for layer in layers: | ||
234 | if os.path.exists(os.path.join(layer.layer_version.layer.local_source_dir,"..","oe-init-build-env")): | ||
235 | logger.debug("localhostbecontroller, setting pokydirname to %s" % (layer.layer_version.layer.local_source_dir)) | ||
236 | self.pokydirname = os.path.join(layer.layer_version.layer.local_source_dir,"..") | ||
237 | break | ||
238 | else: | ||
239 | logger.error("pokydirname is not set, you will run into trouble!") | ||
228 | 240 | ||
229 | # 5. create custom layer and add custom recipes to it | 241 | # 5. create custom layer and add custom recipes to it |
230 | for target in targets: | 242 | for target in targets: |