From 377c74434034ac2223cda88b0fe9a91d921698e5 Mon Sep 17 00:00:00 2001 From: Tim Orling Date: Sat, 12 Mar 2022 12:31:27 -0800 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/buildinfohelper.py | 16 +++++----------- 1 file 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): self.task_order = 0 self.autocommit_step = 1 self.server = server - # we use manual transactions if the database doesn't autocommit on us - if not connection.features.autocommits_when_autocommit_is_off: - transaction.set_autocommit(False) self.orm_wrapper = ORMWrapper() self.has_build_history = has_build_history self.tmp_dir = self.server.runCommand(["getVariable", "TMPDIR"])[0] @@ -1313,12 +1310,11 @@ class BuildInfoHelper(object): task_information['outcome'] = Task.OUTCOME_FAILED del self.internal_state['taskdata'][identifier] - if not connection.features.autocommits_when_autocommit_is_off: - # we force a sync point here, to get the progress bar to show - if self.autocommit_step % 3 == 0: - transaction.set_autocommit(True) - transaction.set_autocommit(False) - self.autocommit_step += 1 + # we force a sync point here, to get the progress bar to show + if self.autocommit_step % 3 == 0: + transaction.set_autocommit(True) + transaction.set_autocommit(False) + self.autocommit_step += 1 self.orm_wrapper.get_update_task_object(task_information, True) # must exist @@ -1990,8 +1986,6 @@ class BuildInfoHelper(object): # Do not skip command line build events self.store_log_event(tempevent,False) - if not connection.features.autocommits_when_autocommit_is_off: - transaction.set_autocommit(True) # unset the brbe; this is to prevent subsequent command-line builds # being incorrectly attached to the previous Toaster-triggered build; -- cgit v1.2.3-54-g00ecf