summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2015-12-09 19:56:32 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-14 23:13:07 +0000
commit0f602c1a22ba21cba5372dbf03a1c41d7116f596 (patch)
tree03aa84a4afad831b6d4fbf8cacdb7a68a157c0f8 /bitbake
parent93f573836c0a5759051000a5f0df59020b61be3e (diff)
downloadpoky-0f602c1a22ba21cba5372dbf03a1c41d7116f596.tar.gz
bitbake: toaster: Update API used to make runbuilds methods run in transactions
runbuilds previously had its methods decorated with transaction.commit_on_success, which is now deprecated. transaction.atomic is an (almost) drop-in replacement for this, so use this instead. [YOCTO #8364] (Bitbake rev: c4804b84eaaef6a81027bae5cf8bfe63d949c293) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
index 48dc618bcf..d40dedb4b0 100644
--- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
+++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
@@ -14,14 +14,14 @@ class Command(NoArgsCommand):
14 help = "Schedules and executes build requests as possible. Does not return (interrupt with Ctrl-C)" 14 help = "Schedules and executes build requests as possible. Does not return (interrupt with Ctrl-C)"
15 15
16 16
17 @transaction.commit_on_success 17 @transaction.atomic
18 def _selectBuildEnvironment(self): 18 def _selectBuildEnvironment(self):
19 bec = getBuildEnvironmentController(lock = BuildEnvironment.LOCK_FREE) 19 bec = getBuildEnvironmentController(lock = BuildEnvironment.LOCK_FREE)
20 bec.be.lock = BuildEnvironment.LOCK_LOCK 20 bec.be.lock = BuildEnvironment.LOCK_LOCK
21 bec.be.save() 21 bec.be.save()
22 return bec 22 return bec
23 23
24 @transaction.commit_on_success 24 @transaction.atomic
25 def _selectBuildRequest(self): 25 def _selectBuildRequest(self):
26 br = BuildRequest.objects.filter(state = BuildRequest.REQ_QUEUED).order_by('pk')[0] 26 br = BuildRequest.objects.filter(state = BuildRequest.REQ_QUEUED).order_by('pk')[0]
27 br.state = BuildRequest.REQ_INPROGRESS 27 br.state = BuildRequest.REQ_INPROGRESS