From: Ed Bartosh Date: Wed, 6 Apr 2016 16:46:48 +0000 (+0100) Subject: toasterui: update build in internal state X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d056cf40fc55530cb1736aedfb9a3c355884991e;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Ed Bartosh Signed-off-by: Michael Wood Signed-off-by: Richard Purdie --- diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py index 9cb2c540671..1473a67222b 100644 --- a/lib/bb/ui/buildinfohelper.py +++ b/lib/bb/ui/buildinfohelper.py @@ -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: