summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/buildinfohelper.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-09-16 17:22:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-21 21:58:06 +0100
commit7a3cccbd1aa4333df6ab46d87b4b1f39d1fe683d (patch)
treecf680b6503158c7372759614c981e61401170541 /bitbake/lib/bb/ui/buildinfohelper.py
parentad04a6324e8fd6c6de87bad6a366d7077835947c (diff)
downloadpoky-7a3cccbd1aa4333df6ab46d87b4b1f39d1fe683d.tar.gz
bitbake: toaster: unlock BuildEnvirnoment when build is done
There is no need to lock build environment before changing build status as this operation is very fast. However, there is a need to unlock it after changing build status. Explicitly unlocked BuildEnvironment after build reaches final status SUCCEEDED, FAILED or CANCELLED. This should allow runbuilds process to pickup next build faster. (Bitbake rev: faa88272d656640c039572c5c8f3e6c56535b6f7) 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>
Diffstat (limited to 'bitbake/lib/bb/ui/buildinfohelper.py')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index c93ee94d2c..22469607d6 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -1524,9 +1524,7 @@ class BuildInfoHelper(object):
1524 return 1524 return
1525 1525
1526 br_id, be_id = self.brbe.split(":") 1526 br_id, be_id = self.brbe.split(":")
1527 be = BuildEnvironment.objects.get(pk = be_id) 1527
1528 be.lock = BuildEnvironment.LOCK_LOCK
1529 be.save()
1530 br = BuildRequest.objects.get(pk = br_id) 1528 br = BuildRequest.objects.get(pk = br_id)
1531 1529
1532 # if we're 'done' because we got cancelled update the build outcome 1530 # if we're 'done' because we got cancelled update the build outcome
@@ -1543,6 +1541,10 @@ class BuildInfoHelper(object):
1543 else: 1541 else:
1544 br.state = BuildRequest.REQ_FAILED 1542 br.state = BuildRequest.REQ_FAILED
1545 br.save() 1543 br.save()
1544
1545 be = BuildEnvironment.objects.get(pk = be_id)
1546 be.lock = BuildEnvironment.LOCK_FREE
1547 be.save()
1546 signal_runbuilds() 1548 signal_runbuilds()
1547 1549
1548 def store_log_error(self, text): 1550 def store_log_error(self, text):