summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-02-10 18:34:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-11 22:34:19 +0000
commit1f7f07746629a55e4efd5f505e84eb6c66567115 (patch)
tree210b0ddd930a41666c0960ce15554d26fbf5f5d6 /bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
parent9a6cb10d4a611ed64700f9e9240c2958db7e2234 (diff)
downloadpoky-1f7f07746629a55e4efd5f505e84eb6c66567115.tar.gz
bitbake: buildinfohelper: unset brbe variable when build finishes
The brbe variable is set on the bitbake server when the Toaster UI starts. This enables Toaster to associate events with the correct build and build environment. However, the brbe variable is also used when a build starts to identify whether a new build needs to be created, or an existing one looked up. This causes a bug for command-line builds which happen after a Toaster-triggered build: because the brbe variable is never unset on the server or the buildinfohelper, the new command-line build events are treated as originating from the previous build. Ensure the brbe variable is reset when the buildinfohelper "closes" a build, so that each build then either sets the brbe variable (Toaster-triggered builds) or leaves it blank (command-line builds). Also modify the localhostbecontroller so that the brbe variable is not set on the server and not looked up from the server. This ensures that it is only set when the triggerBuild() method is called, and that it remains as None for command-line builds. [YOCTO #9021] (Bitbake rev: 4a6a8d0074f62208d843b06344be31ae73d9b745) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/localhostbecontroller.py')
-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 a7db1efc65..efd82c325b 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -308,12 +308,17 @@ class LocalhostBEController(BuildEnvironmentController):
308 # get the bb server running with the build req id and build env id 308 # get the bb server running with the build req id and build env id
309 bbctrl = self.getBBController() 309 bbctrl = self.getBBController()
310 310
311 # set variables 311 # set variables; TOASTER_BRBE is not set on the server, as this
312 # causes events from command-line builds to be attached to the last
313 # Toaster-triggered build; instead, TOASTER_BRBE is fired as an event so
314 # that toasterui can set it on the buildinfohelper;
315 # see https://bugzilla.yoctoproject.org/show_bug.cgi?id=9021
312 for var in variables: 316 for var in variables:
313 bbctrl.setVariable(var.name, var.value)
314 if var.name == 'TOASTER_BRBE': 317 if var.name == 'TOASTER_BRBE':
315 bbctrl.triggerEvent('bb.event.MetadataEvent("SetBRBE", "%s")' \ 318 bbctrl.triggerEvent('bb.event.MetadataEvent("SetBRBE", "%s")' \
316 % var.value) 319 % var.value)
320 else:
321 bbctrl.setVariable(var.name, var.value)
317 322
318 # Add 'toaster' and 'buildhistory' to INHERIT variable 323 # Add 'toaster' and 'buildhistory' to INHERIT variable
319 inherit = {item.strip() for item in bbctrl.getVariable('INHERIT').split()} 324 inherit = {item.strip() for item in bbctrl.getVariable('INHERIT').split()}