toaster: Add support for custom script and use toaster-bblayers.conf
cover toaster: Add support for custom script and use toaster-bblayers.conf
The following changes since commit 6eec988c6a5f276a78b3c2de9aa231c8b0097d20:
toaster: layerindex updater Take into account layers being predefined (2016-11-09 18:26:41 -0800)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib sujith/toaster-use-custom-build-scriptsV2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=sujith/toaster-use-custom-build-scriptsV2
Sujith H (2):
toaster: localhostbecontroller accept custom init script for build
toaster: localhostbecontroller write toaster layers for project to
toaster-bblayers.conf
.../toaster/bldcontrol/localhostbecontroller.py | 27 +++++++++------------- 1 file changed, 11 insertions(+), 16 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/2 toaster: localhostbecontroller accept custom init script for build
From: Sujith H <[email protected]>
When passed variable CUSTOM_BUILD_INIT_SCRIPT to toaster setting, it would be nice to use it. Else toaster can use oe-init script. This gives an oppurtunity to use customized build init scritps.
--- bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +7 -2
@@ -27,7 +27,7 @@ import shutil from django.db import transaction from django.db.models import Q from bldcontrol.models import BuildEnvironment, BRLayer, BRVariable, BRTarget, BRBitbake -from orm.models import CustomImageRecipe, Layer, Layer_Version, ProjectLayer +from orm.models import CustomImageRecipe, Layer, Layer_Version, ProjectLayer, ToasterSetting import subprocess from toastermain import settings
@@ -277,7 +277,12 @@ 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("bash -c 'source %s %s'" % (oe_init, builddir), + try: + custom_script = ToasterSetting.objects.get(name="CUSTOM_BUILD_INIT_SCRIPT").value + custom_script = custom_script.replace("%BUILDDIR%" ,builddir) + self._shellcmd("bash -c 'source %s'" % (custom_script)) + except ToasterSetting.DoesNotExist: + self._shellcmd("bash -c 'source %s %s'" % (oe_init, builddir), self.be.sourcedir) # update bblayers.conf
Signature · 1 line
1.9.1