bitbake: toasterui: update build in internal state

buildinfohelper stores current Build object in its internal
state. Any changes to Build object will be lost if internal
state is not updated as current buildinfohelper code
saves Build object from internal state when build is
completed.

This bug causes incorrect build state when build is cancelled.
Updating internal state should fix it.

Note, that this commit updates internal state after status of
the build is changed to Build.CANCELLED. There are several other
places in the code where Build object is updated without updating
internal state. They should be carefully analyzed and fixed.

(Bitbake rev: d056cf40fc55530cb1736aedfb9a3c355884991e)

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>
This commit is contained in:
Ed Bartosh 2016-04-06 17:46:48 +01:00 committed by Richard Purdie
parent acb94078c4
commit 860cba85cf
1 changed files with 1 additions and 0 deletions

View File

@ -1420,6 +1420,7 @@ class BuildInfoHelper(object):
logger.info("Build cancelled")
br.build.outcome = Build.CANCELLED
br.build.save()
self.internal_state['build'] = br.build
errorcode = 0
if errorcode == 0: