summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/buildinfohelper.py
diff options
context:
space:
mode:
authorTim Orling <ticotimo@gmail.com>2022-03-12 12:31:27 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-15 08:40:09 +0000
commit377c74434034ac2223cda88b0fe9a91d921698e5 (patch)
tree265fe6141a33f800ccece8e0eab1316bea785b8f /bitbake/lib/bb/ui/buildinfohelper.py
parenta28a201886421b78d0d7503416ccbd08e4faa325 (diff)
downloadpoky-377c74434034ac2223cda88b0fe9a91d921698e5.tar.gz
bitbake: bitbake: buildinfohelper.py fix for Django 3.2
connection.features.autocommits_when_autocommit_is_off was deprecated in 3.0 and is no longer present in 3.2 (Bitbake rev: cc0f526fb4298349d0eea44c8f35d3dd226cc8d6) Signed-off-by: Tim Orling <tim.orling@konsulko.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.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 835e92c299..8fef663469 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -893,9 +893,6 @@ class BuildInfoHelper(object):
893 self.task_order = 0 893 self.task_order = 0
894 self.autocommit_step = 1 894 self.autocommit_step = 1
895 self.server = server 895 self.server = server
896 # we use manual transactions if the database doesn't autocommit on us
897 if not connection.features.autocommits_when_autocommit_is_off:
898 transaction.set_autocommit(False)
899 self.orm_wrapper = ORMWrapper() 896 self.orm_wrapper = ORMWrapper()
900 self.has_build_history = has_build_history 897 self.has_build_history = has_build_history
901 self.tmp_dir = self.server.runCommand(["getVariable", "TMPDIR"])[0] 898 self.tmp_dir = self.server.runCommand(["getVariable", "TMPDIR"])[0]
@@ -1313,12 +1310,11 @@ class BuildInfoHelper(object):
1313 task_information['outcome'] = Task.OUTCOME_FAILED 1310 task_information['outcome'] = Task.OUTCOME_FAILED
1314 del self.internal_state['taskdata'][identifier] 1311 del self.internal_state['taskdata'][identifier]
1315 1312
1316 if not connection.features.autocommits_when_autocommit_is_off: 1313 # we force a sync point here, to get the progress bar to show
1317 # we force a sync point here, to get the progress bar to show 1314 if self.autocommit_step % 3 == 0:
1318 if self.autocommit_step % 3 == 0: 1315 transaction.set_autocommit(True)
1319 transaction.set_autocommit(True) 1316 transaction.set_autocommit(False)
1320 transaction.set_autocommit(False) 1317 self.autocommit_step += 1
1321 self.autocommit_step += 1
1322 1318
1323 self.orm_wrapper.get_update_task_object(task_information, True) # must exist 1319 self.orm_wrapper.get_update_task_object(task_information, True) # must exist
1324 1320
@@ -1990,8 +1986,6 @@ class BuildInfoHelper(object):
1990 # Do not skip command line build events 1986 # Do not skip command line build events
1991 self.store_log_event(tempevent,False) 1987 self.store_log_event(tempevent,False)
1992 1988
1993 if not connection.features.autocommits_when_autocommit_is_off:
1994 transaction.set_autocommit(True)
1995 1989
1996 # unset the brbe; this is to prevent subsequent command-line builds 1990 # unset the brbe; this is to prevent subsequent command-line builds
1997 # being incorrectly attached to the previous Toaster-triggered build; 1991 # being incorrectly attached to the previous Toaster-triggered build;