From patchwork Sat Mar 12 20:31:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Orling X-Patchwork-Id: 5153 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FDA6C433EF for ; Sat, 12 Mar 2022 20:31:56 +0000 (UTC) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mx.groups.io with SMTP id smtpd.web08.8719.1647117115361578376 for ; Sat, 12 Mar 2022 12:31:55 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=j92BIsmC; spf=pass (domain: gmail.com, ip: 209.85.216.53, mailfrom: ticotimo@gmail.com) Received: by mail-pj1-f53.google.com with SMTP id b8so11067187pjb.4 for ; Sat, 12 Mar 2022 12:31:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oShbpthFXa64glVSfkBOWyxLrC2OemfJPW2fyWuDukM=; b=j92BIsmC9v5GOkhZlb6NX6IuPE2kXAmCamGFU/ukiUdhH5q9yf4qqKvR+zVcqblJgE F3U4MwQuuvZDb1LPixzsGOuHTd+h1PFRYWpn7MCb2E6MF1uxSbFOHJggWge5uHkg1Yy1 jYkl2fTSfAbdY1Ls0UGvJmUn/R6XR2T01COiAeSNqJQiTUIJhIAFdaa7TRFLjvZ5W0Z3 MBH03TTeHmLiLqltS55wIUtO1HQfyZOYo3TOjtyH80PZt6uZhhNAnrxQFN937+TE7aOR wkIkuDgPh8T0Tq1Ohqi48Mj8VW7CezPJT/ZDNtscKq/8yjT+f11chLUd2zEIm1CUlOMg 8Oxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oShbpthFXa64glVSfkBOWyxLrC2OemfJPW2fyWuDukM=; b=VDMVES45UmvOl64pKOs3gDjTbYfBP+cwcifaPxjDl6rOd4P+e+gbLHj7JGzAwBUqGX TjCukZdVAgm1JyLv3aK4Mo160a3Uf4WoAbFlJDmpK1Yvm4BMcUqv0Dv+bf2QZFSmieu/ FygBwzjAGNxi24mD7DjJNVckuRlLC3hHJZ3SXw4DqyijQGqNsKphjSN6S8uqvQ43TQYt lpFH9piH+XFlbq0GbTYxMTV3Yovsv7R6vxLYgaxmN2tuzwFJglwN1JP2PvDxP1tkBCDJ IWnV3JTdB4y0g7THwikGPfl7fx70/Rup0SNk0/xLoFlMfCVLxGbxNRaQFzy46StIlYxb IABw== X-Gm-Message-State: AOAM531bfaHeJJbmLVyttyR3y4U7jMeSUt1Nf0o6bgYH2OzMqiFhyGbJ NIDrkruIyr4zwrcovZNudNO5pMmkhao= X-Google-Smtp-Source: ABdhPJzLOHWq8QyfFoYhiyrC0c+YbGdYh5UJfY0R0X3XwYfOF+J/K1Z9ZATFDI5cf5tUmNIADVIPfw== X-Received: by 2002:a17:902:b208:b0:14f:14e8:1e49 with SMTP id t8-20020a170902b20800b0014f14e81e49mr16414208plr.35.1647117114537; Sat, 12 Mar 2022 12:31:54 -0800 (PST) Received: from nereus.local ([2601:1c0:6000:1b20:a9d2:e45f:26bc:3c95]) by smtp.gmail.com with ESMTPSA id f194-20020a6238cb000000b004f6ce898c61sm14479378pfa.77.2022.03.12.12.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Mar 2022 12:31:54 -0800 (PST) From: Tim Orling X-Google-Original-From: Tim Orling To: toaster@lists.yoctoproject.org Cc: David.Reyna@windriver.com Subject: [PATCH 6/7] bitbake: buildinfohelper.py fix for Django 3.2 Date: Sat, 12 Mar 2022 12:31:27 -0800 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sat, 12 Mar 2022 20:31:56 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/toaster/message/5778 connection.features.autocommits_when_autocommit_is_off was deprecated in 3.0 and is no longer present in 3.2 Signed-off-by: Tim Orling --- 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 835e92c2992..8fef6634691 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;