diff options
-rw-r--r-- | lib/toaster/bldcontrol/localhostbecontroller.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/toaster/bldcontrol/localhostbecontroller.py b/lib/toaster/bldcontrol/localhostbecontroller.py index f960a389c..38503342c 100644 --- a/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/lib/toaster/bldcontrol/localhostbecontroller.py @@ -351,6 +351,19 @@ class LocalhostBEController(BuildEnvironmentController): # clean the Toaster to build environment env_clean = 'unset BBPATH;' # clean BBPATH for <= YP-2.4.0 + # run bitbake server from the clone if available + # otherwise pick it from the PATH + bitbake = os.path.join(self.pokydirname, 'bitbake', 'bin', 'bitbake') + if not os.path.exists(bitbake): + logger.info("Bitbake not available under %s, will try to use it from PATH" % + self.pokydirname) + for path in os.environ["PATH"].split(os.pathsep): + if os.path.exists(os.path.join(path, 'bitbake')): + bitbake = os.path.join(path, 'bitbake') + break + else: + logger.error("Looks like Bitbake is not available, please fix your environment") + # run bitbake server from the clone bitbake = os.path.join(self.pokydirname, 'bitbake', 'bin', 'bitbake') toasterlayers = os.path.join(builddir,"conf/toaster-bblayers.conf") |