summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r--bitbake/lib/toaster/bldcontrol/localhostbecontroller.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index e5f7c988c2..3896a829a9 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -27,7 +27,7 @@ import shutil
27from django.db import transaction 27from django.db import transaction
28from django.db.models import Q 28from django.db.models import Q
29from bldcontrol.models import BuildEnvironment, BRLayer, BRVariable, BRTarget, BRBitbake 29from bldcontrol.models import BuildEnvironment, BRLayer, BRVariable, BRTarget, BRBitbake
30from orm.models import CustomImageRecipe, Layer, Layer_Version, ProjectLayer 30from orm.models import CustomImageRecipe, Layer, Layer_Version, ProjectLayer, ToasterSetting
31import subprocess 31import subprocess
32 32
33from toastermain import settings 33from toastermain import settings
@@ -277,7 +277,12 @@ class LocalhostBEController(BuildEnvironmentController):
277 builddir = '%s-toaster-%d' % (self.be.builddir, bitbake.req.project.id) 277 builddir = '%s-toaster-%d' % (self.be.builddir, bitbake.req.project.id)
278 oe_init = os.path.join(self.pokydirname, 'oe-init-build-env') 278 oe_init = os.path.join(self.pokydirname, 'oe-init-build-env')
279 # init build environment 279 # init build environment
280 self._shellcmd("bash -c 'source %s %s'" % (oe_init, builddir), 280 try:
281 custom_script = ToasterSetting.objects.get(name="CUSTOM_BUILD_INIT_SCRIPT").value
282 custom_script = custom_script.replace("%BUILDDIR%" ,builddir)
283 self._shellcmd("bash -c 'source %s'" % (custom_script))
284 except ToasterSetting.DoesNotExist:
285 self._shellcmd("bash -c 'source %s %s'" % (oe_init, builddir),
281 self.be.sourcedir) 286 self.be.sourcedir)
282 287
283 # update bblayers.conf 288 # update bblayers.conf