From patchwork Mon Nov 30 15:28:31 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 106514 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.34863.1796052531236073621 for ; Mon, 30 Nov 2026 07:28:51 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=A3/Lg7Xj; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.50, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-492690dd5daso8270140f8f.1 for ; Mon, 30 Nov 2026 07:28:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1796052529; x=1796657329; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=uvcIPmcUDE6ZEaJGk3MtGoNcPY34D7eJmNkbgNv5YIg=; b=A3/Lg7XjzSLtlu2ciDhvIHFK0s1QVAqLEFSBzZNgSZjSviXQzYZtLNDY4cXHk8L/cv Qap3Sw8dA7gZJAmvaHX52MrVHR/VtMbOxnO1P4gCdFQLg5dujRkvNc73X3GoZWBehmhT A6IyLLwD4xCkH4YYNJMKYI/+4xgAFW8mNw/Kk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796052529; x=1796657329; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=uvcIPmcUDE6ZEaJGk3MtGoNcPY34D7eJmNkbgNv5YIg=; b=EvBbI0eVQPYJBzr4ScamPyP0uA3HA5Of8dZQ8PS+yx3w8lP8VQbaAAH/4xXMezjV4x KfohsgU/NkZBZ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cIacLOgXVvhf/txOLmgAglv5loHXh1 +7kQ= X-Received: by 2002:a05:6000:4303:b0:492:46e:d4ce with SMTP id ffacd0b85a97d-4abb2168e19mr63479448f8f.13.1796052529293; Mon, 30 Nov 2026 07:28:49 -0800 (PST) Return-Path: Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:2444:81bb:2aff:8d84]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6baa397asm66033172f8f.48.2026.11.30.07.28.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 07:28:48 -0800 (PST) From: Richard Purdie To: bitbake-devel@lists.openembedded.org Subject: [PATCH 01/17] uihelper: Fix exception when TaskStarted event handler breaks Date: Mon, 30 Nov 2026 15:28:31 +0000 Message-ID: <20261130152847.3472849-1-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Mon, 30 Nov 2026 15:29:01 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/20490 If there is an exception in a TaskStarted event handler, we can get a still get a TaskFailed event which will trigger a second exception. Since our TaskStarted code may not have run. Avoid that second exception from an undefined dict key. Signed-off-by: Richard Purdie --- lib/bb/ui/uihelper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/bb/ui/uihelper.py b/lib/bb/ui/uihelper.py index 3e077f04484..18079195ff5 100644 --- a/lib/bb/ui/uihelper.py +++ b/lib/bb/ui/uihelper.py @@ -25,6 +25,9 @@ class BBUIHelper: # PIDs are a bad idea as they can be reused before we process all UI events. # We maintain a 'fuzzy' match for TaskProgress since there is no other way to match def removetid(pid, tid): + if tid not in self.running_tasks: + # This is possible if you have an exception during a TaskStarted handler + return del self.running_tasks[tid] if self.pidmap[pid] == tid: del self.pidmap[pid]