summaryrefslogtreecommitdiffstats
path: root/lib/toaster/bldcontrol/localhostbecontroller.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-04-06 17:46:27 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-06 23:00:10 +0100
commite4352603b21d43a8b5d9ee417c036fff0a263d40 (patch)
tree95356dd9333cd8df930bfde94bcf153c55b94eef /lib/toaster/bldcontrol/localhostbecontroller.py
parent79611d0ea742263074fbb0bf5f1e39df75fd9f55 (diff)
downloadopenembedded-core-contrib-e4352603b21d43a8b5d9ee417c036fff0a263d40.tar.gz
toaster: use bash explicitly
Toaster can't run builds on Ubuntu as default /bin/sh points to dash there. The reason is that oe-init-build-env can't be sourced under dash for various reasons. It can be fixed or work arounded, but it wouldn't fix builds for older releases. Explicitly using bash to start builds should fix the issue. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/bldcontrol/localhostbecontroller.py')
-rw-r--r--lib/toaster/bldcontrol/localhostbecontroller.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/toaster/bldcontrol/localhostbecontroller.py b/lib/toaster/bldcontrol/localhostbecontroller.py
index 6d7f433f9f..73c5f1ff80 100644
--- a/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -258,7 +258,8 @@ class LocalhostBEController(BuildEnvironmentController):
builddir = '%s-toaster-%d' % (self.be.builddir, bitbake.req.project.id)
oe_init = os.path.join(self.pokydirname, 'oe-init-build-env')
# init build environment
- self._shellcmd('source %s %s' % (oe_init, builddir), self.be.sourcedir)
+ self._shellcmd("bash -c 'source %s %s'" % (oe_init, builddir),
+ self.be.sourcedir)
# update bblayers.conf
bblconfpath = os.path.join(builddir, "conf/bblayers.conf")
@@ -286,9 +287,9 @@ class LocalhostBEController(BuildEnvironmentController):
# run bitbake server from the clone
bitbake = os.path.join(self.pokydirname, 'bitbake', 'bin', 'bitbake')
- self._shellcmd('source %s %s; BITBAKE_UI="" %s --read %s '
- '--server-only -t xmlrpc -B 0.0.0.0:0' % (oe_init, builddir,
- bitbake, confpath), self.be.sourcedir)
+ self._shellcmd('bash -c \"source %s %s; BITBAKE_UI="" %s --read %s '
+ '--server-only -t xmlrpc -B 0.0.0.0:0\"' % (oe_init,
+ builddir, bitbake, confpath), self.be.sourcedir)
# read port number from bitbake.lock
self.be.bbport = ""
@@ -319,9 +320,9 @@ class LocalhostBEController(BuildEnvironmentController):
# run build with local bitbake. stop the server after the build.
log = os.path.join(builddir, 'toaster_ui.log')
- self._shellcmd(['(TOASTER_BRBE="%s" BBSERVER="0.0.0.0:-1" '
+ self._shellcmd(['bash -c \"(TOASTER_BRBE="%s" BBSERVER="0.0.0.0:-1" '
'../bitbake/bin/bitbake %s -u toasterui >>%s 2>&1;'
- 'BITBAKE_UI="" BBSERVER=0.0.0.0:-1 %s -m)&' \
+ 'BITBAKE_UI="" BBSERVER=0.0.0.0:-1 %s -m)&\"' \
% (brbe, bbtargets, log, bitbake)], builddir,
nowait=True)