summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/buildinfohelper.py
diff options
context:
space:
mode:
authorDavid Reyna <David.Reyna@windriver.com>2022-03-20 22:02:21 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-21 10:07:40 +0000
commitc71a9c89e3c23ba1f1eec06c0183ee1d7148041d (patch)
tree52da69539d76042c9ee7d3cb80fba548d7cdf1c2 /bitbake/lib/bb/ui/buildinfohelper.py
parent4769eaebb40772fca1af6d59b104cc0db00fbbc5 (diff)
downloadpoky-c71a9c89e3c23ba1f1eec06c0183ee1d7148041d.tar.gz
bitbake: toaster: race condition for end-of-build
Force a sync point for end-of build event handler force the build's outcome status commit, to resolve a race condition with the build completion takedown. [YOCTO #14765] (Bitbake rev: f76c13536e19d2401365c0fc240ef8dbcb3ee7e8) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/buildinfohelper.py')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 8fef663469..0761f73b3b 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -227,6 +227,12 @@ class ORMWrapper(object):
227 build.completed_on = timezone.now() 227 build.completed_on = timezone.now()
228 build.outcome = outcome 228 build.outcome = outcome
229 build.save() 229 build.save()
230
231 # We force a sync point here to force the outcome status commit,
232 # which resolves a race condition with the build completion takedown
233 transaction.set_autocommit(True)
234 transaction.set_autocommit(False)
235
230 signal_runbuilds() 236 signal_runbuilds()
231 237
232 def update_target_set_license_manifest(self, target, license_manifest_path): 238 def update_target_set_license_manifest(self, target, license_manifest_path):