From patchwork Sat Oct 11 03:11:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Kjellerstedt X-Patchwork-Id: 72068 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 5DF12CCD187 for ; Sat, 11 Oct 2025 03:11:51 +0000 (UTC) Received: from AM0PR02CU008.outbound.protection.outlook.com (AM0PR02CU008.outbound.protection.outlook.com [52.101.72.15]) by mx.groups.io with SMTP id smtpd.web11.4393.1760152305419253158 for ; Fri, 10 Oct 2025 20:11:45 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@axis.com header.s=selector1 header.b=Mo6mjoZ6; spf=pass (domain: axis.com, ip: 52.101.72.15, mailfrom: peter.kjellerstedt@axis.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=k8h4hTOsvdxFSV9Uzr2V3zQVAajySBVUJpGPeGoVtO9di252J08OoqpyqUx+F+ZOBtdTKOUk2C8nJXVb+LBlB5rEmzpcmKCW4RJ0inIxDqkuH/vHG8ad5SAmSGu2q/lox6+K548W7fQBn5lDa+OXmxKP/r2Q/Uh7NPAeUowzZyb+g4qjlFX6XpljFv3Rgk+a0yiQrYIojnunrTwFZdvNJjnQYh+7swfuoQ+T8UtFvPjVNYvT29fDicEdKMKXtSRcM9/58u2g6x3IZEqsNs/LzTP3sCLhdmXdybWW/UzRPchON8pRMmxjJvgrIIIrfA2GUNpa0fGQzBUSinwrKwnXPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=19tixdHravoWH5Nl5Jxt5hX59KqOEiReF/4v+QDlVhs=; b=uTL4uRNGvuaiUIeLMLEerah6K+3LNqKdA3yD1ebzeCAJHp2glPXSy8PdviJ1PdMn3yt1RADL4PWTGX+Km0RgOrQGjF6fWkTV/ebI8wJoRB1uyEXbZFMpmbzLvxIYLd9s84n6Wtf1TAL9/YnNDzxR+Cq82qWDts379fs8Kn4NrLgyUYi9lPdjzpFz/qH+O1JZ+KsRfa8PEMQl/ZKV+U2xsp0w0qL0wa3MZW3PbfNlXfcRHwNm/yYBZcdGA66KnQ2Ey+XOtNnpmHqrd/8+5Jd0xfxwHpFnRNBj9gd6ng0hnOZMAJWihlO06Z9j5xPTx5XCw7fnmcrZ4PDmxIh/EV5Edg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 195.60.68.100) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=axis.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=19tixdHravoWH5Nl5Jxt5hX59KqOEiReF/4v+QDlVhs=; b=Mo6mjoZ6XVLNnj7nKXYLrzzeAghBSB3NXoovQul65IlqLBpzYGWgJqQUNmBaA49+k+T0YhkavjyICoFaWUQWU0SDnMZ0w7PW2eemyu+bB0i4hSTQeUCqRakY1yb3YZYfvR8K7RIlaHlinRcNDNFlJ31zHNCGmLfh7cE78/dIOzc= Received: from AM4PR0302CA0025.eurprd03.prod.outlook.com (2603:10a6:205:2::38) by GVX0PF6C155ADC6.eurprd02.prod.outlook.com (2603:10a6:158:401::b14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9203.10; Sat, 11 Oct 2025 03:11:39 +0000 Received: from AMS0EPF00000198.eurprd05.prod.outlook.com (2603:10a6:205:2:cafe::e8) by AM4PR0302CA0025.outlook.office365.com (2603:10a6:205:2::38) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9203.10 via Frontend Transport; Sat, 11 Oct 2025 03:11:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=axis.com; Received-SPF: Pass (protection.outlook.com: domain of axis.com designates 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; pr=C Received: from mail.axis.com (195.60.68.100) by AMS0EPF00000198.mail.protection.outlook.com (10.167.16.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.9228.7 via Frontend Transport; Sat, 11 Oct 2025 03:11:38 +0000 Received: from se-mail01w.axis.com (10.20.40.7) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Sat, 11 Oct 2025 05:11:38 +0200 Received: from se-intmail02x.se.axis.com (10.4.0.28) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Sat, 11 Oct 2025 05:11:38 +0200 Received: from pc56063-2339.se.axis.com (pc56063-2339.se.axis.com [10.92.3.2]) by se-intmail02x.se.axis.com (Postfix) with ESMTP id 83A5B1C8C for ; Sat, 11 Oct 2025 05:11:38 +0200 (CEST) Received: by pc56063-2339.se.axis.com (Postfix, from userid 14323) id 5810F120675; Sat, 11 Oct 2025 05:11:37 +0200 (CEST) From: Peter Kjellerstedt To: Subject: [PATCH 1/3] knotty, uihelper: Remove running_pids and lastpids Date: Sat, 11 Oct 2025 05:11:33 +0200 Message-ID: <20251011031135.2243358-1-pkj@axis.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF00000198:EE_|GVX0PF6C155ADC6:EE_ X-MS-Office365-Filtering-Correlation-Id: 3120fdd4-236f-490a-16b5-08de0873e4ee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: /6XvjWfETjVBpDOAe6N2vRGmk9vTmWtj1Rx30gBbGgZGeItHX9df2uXsAbgWd/EPuzQlspUuF3owtlbx2fSYEIpHxeyTFhLJdlbK+hBRyWoO5fNi8aPK7BUqpEEzyKBrJbiuW/6lALITbid+8i+lHpQEVYT6elWo6+5cW4cuFZoyHb6Kq6etK5d+fcdiNrCSqt+w29JCVB4Pe/7TfdkvfwJFxPJNxn2MxYhqPStZfMs1dcxJA+WpxuVUGwAMw6C4tfJfm0YfkOdLPzRu1lY7PDloegsHX9j8ezaMb13xk3Zm5nKxk+wSixPBN5QSeOZSvRn+cc6QIDLBHcvY1bsj6IeK0kzznqol5NsMBWDPnAlVfRYke6gUHuqZ8B9mLvGWa1uidNiYeigK2tmakMsZVFZOJ5WPD2YLjUebzHr/4008xSzQhEzlHfWWbgKP2PKm+GFg0dPiDTKG5FppQcpuU0Zwz92CmsCRtmQ4zrMkJMJnbwINYTPeD2xktXkVGxhXwxfB/Z+LszQa3se4uMHX/pbGiWKoszXdrkwXS+NWwge4mobBEavrzsGs3GqtPKi2k2M5DZsS87jppMvZ16cCVi4ATjgjS1RNop0sO/LdNXbhy1l752KrCYiOw/mIkQNxy3QjOdH3LNmnc4wisc5XVxZsiAm2PAw0jA6cEEcVOcrZ1sc19woGPWPf3hreFG6z7H/tZrJh2fhcxnA7RCLkqZXbpHzDlE6uyowWCX+P/LII7X6B4gRhAMcyt0m4ZwIBfrXPzWVObN68bXbiXBLPpvHnQDeh7KfUxNdL/Kk5BQaiFg0YQJ2HDGUPGnIgUnZDJyqKs5026LyLKMR//dB4rzzDpKnDy1ydLO7CCnckI5w5GZxMN8XUvn5Qqu2HwQnbZ15g4i4Us66p0hrAPWzRh1j7mbNBhkYVElunzXce7JvPMRogzgL7B8hvYbnGhraeAr+DC9IHlPjUsFyPWFfjz9hLEF/hTjx7zHmnL3Dz+PCI6DHec+qy7ySIJKdMmH8dU26ryVtNaK1H9W/Bms4CWrT44VYdh4Dw1+jOARWv45h0tr7XtxK2HC36fyZlaYp8MbQGcyBSQydIG5NIUUnGZwmPpn89USDWHu1t8Dz3NbzSRdyfN0AiaCa5mPmlTxfBg2NYtud4b1fuXyBe+iSucWutMoHKyWDUfdJVF/dbVWPtVcMZ/Zni7u/mCYzE9Q25mjJEOj5MBYff3eey5MjatGbSYVxEO5HvCHWEuKWnUjGzZndy2DmYVa4/laIfvpFjzYOgpggf9xZSi7eFeq3MMxAO71b+1RhQkd57ogP/CnxcQ2/tdz27oeVzd7GsTFGT5uUxamVvy1yChqE/UiNOTv+UiPVPtA8fCMZ+1RIkWgSNS7CJIkkkYqSOcX8TpA6ZN5jKWMKqYRW4AbR+u0LOkKi5AE9H/rMTXR0aLniMUj6QtVB4vTPB6tfWEwVQd3YmzlwQUaqNX8a8tmZuNbToK2SXte1IOtPiHl5xOCG5C9qEHWGia0mIFX8Rz5iDvhx2VuMOGQfEbE7Xt1q76dPXq69m7INT/I9ui8Vx939OK8s= X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(376014)(82310400026)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2025 03:11:38.7857 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3120fdd4-236f-490a-16b5-08de0873e4ee X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF00000198.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVX0PF6C155ADC6 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, 11 Oct 2025 03:11:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18172 * lastpids has not been used for almost 10 years. * There is no longer any need to use running_pids to keep track of the order the pids in running_tasks were added as dicts are guaranteed to remember the insertion order since Python 3.7. Signed-off-by: Peter Kjellerstedt --- bitbake/lib/bb/ui/knotty.py | 5 +---- bitbake/lib/bb/ui/uihelper.py | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 492ea20763..00258c80ff 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py @@ -169,7 +169,6 @@ class TerminalFilter(object): self.stdinbackup = None self.interactive = sys.stdout.isatty() self.footer_present = False - self.lastpids = [] self.lasttime = time.time() self.quiet = quiet @@ -254,7 +253,6 @@ class TerminalFilter(object): return activetasks = self.helper.running_tasks failedtasks = self.helper.failed_tasks - runningpids = self.helper.running_pids currenttime = time.time() deltatime = currenttime - self.lasttime @@ -283,7 +281,7 @@ class TerminalFilter(object): self._footer_buf.seek(0) tasks = [] - for t in runningpids: + for t in activetasks.keys(): start_time = activetasks[t].get("starttime", None) if start_time: msg = "%s - %s (pid %s)" % (activetasks[t]["title"], self.elapsed(currenttime - start_time), activetasks[t]["pid"]) @@ -358,7 +356,6 @@ class TerminalFilter(object): content = "%s: %s" % (tasknum, task) print(content, file=self._footer_buf) lines = lines + self.getlines(content) - self.lastpids = runningpids[:] self.lastcount = self.helper.tasknumber_current # Clear footer and Print buffer. diff --git a/bitbake/lib/bb/ui/uihelper.py b/bitbake/lib/bb/ui/uihelper.py index e6983bd559..a223632471 100644 --- a/bitbake/lib/bb/ui/uihelper.py +++ b/bitbake/lib/bb/ui/uihelper.py @@ -13,7 +13,6 @@ class BBUIHelper: self.needUpdate = False self.running_tasks = {} # Running PIDs preserves the order tasks were executed in - self.running_pids = [] self.failed_tasks = [] self.pidmap = {} self.tasknumber_current = 0 @@ -23,7 +22,6 @@ 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): - self.running_pids.remove(tid) del self.running_tasks[tid] if self.pidmap[pid] == tid: del self.pidmap[pid] @@ -35,7 +33,6 @@ class BBUIHelper: self.running_tasks[tid] = { 'title' : "mc:%s:%s %s" % (event._mc, event._package, event._task), 'starttime' : time.time(), 'pid' : event.pid } else: self.running_tasks[tid] = { 'title' : "%s %s" % (event._package, event._task), 'starttime' : time.time(), 'pid' : event.pid } - self.running_pids.append(tid) self.pidmap[event.pid] = tid self.needUpdate = True elif isinstance(event, bb.build.TaskSucceeded): From patchwork Sat Oct 11 03:11:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Kjellerstedt X-Patchwork-Id: 72069 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 61C6CCCD185 for ; Sat, 11 Oct 2025 03:11:51 +0000 (UTC) Received: from AS8PR04CU009.outbound.protection.outlook.com (AS8PR04CU009.outbound.protection.outlook.com [52.101.70.65]) by mx.groups.io with SMTP id smtpd.web10.4405.1760152303808700471 for ; Fri, 10 Oct 2025 20:11:44 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@axis.com header.s=selector1 header.b=NMro9FUI; spf=pass (domain: axis.com, ip: 52.101.70.65, mailfrom: peter.kjellerstedt@axis.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=G4Ix78puXmrhilKQKIBU8YO62V6pnJwLtlNc8OgUGDGAVNCZV0KHzwi4h0t4Ch/7Hlr9VstP4S6akv8TIZ5N95xHSJxJlY+0EiuV1xBtKgOK3uA6IiHS06az6/rul+0AKJjACKvXShgOUZB44FrocOQeVm17j1w0QI0pHJJ7nLzsFoCvzn+foTMNhYrSA+TPba1sY7VCjdnl39OJ2SILKa1j4JjljRIVIv/Dhwx8/Vn92+09gGTrO6tCb2XCgGmNP7RNyoKNKOTmnhfegvmMLXCLClYG7usgUr7tbwiwZikNYTD6J4l4fUHPgD3CU+LsnXSbXq/FqOWTAg7DxDoFKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=K0T+OVwCbEul1d+HD63N0XBC50UfWiHaAc33t0Jea+0=; b=dlU8CrJCaGq+3dnj/up4bcdFVlGWUmpiUDvkoRldDBpPC9NoULOK2ydm5Ek5Q55ez50g8F+/KGyPUVxJW3uOCffx3gwI7TPC5GO46vfhG9ZgTR9ThzfEQjuTj/s1ChmIuI4qHmI09UcbYeDzKTc24kIAgE20cPuuVbyb2eK+qf6PIMW+4eCvwtzfHq1btMD/u9lC8Z5iwjtOcVNNrH2N673hN/35JG9S37Ml6DKkInLb7sOdE10QEef/7OaL+JP6f8scFYf/w2rRgVrMo6Zp9sWjULKK2xyim+ZL9zI8Up3d4WethWzVvgkcAS67se6Fr6+qwVL4Bc51QnmSh+uLxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 195.60.68.100) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=axis.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K0T+OVwCbEul1d+HD63N0XBC50UfWiHaAc33t0Jea+0=; b=NMro9FUIKB9xSstYEqFLm49atKHqm4bheekqk0s4uve6Qht5Qfgi/Je4Y+h2mCDR0HfMp3sOUHwMSqlzfTIJUi8g23F+SUUdRacu6K3ulVMGpJOuoaopRc7h7sz+OTuzpvgXaMVf5SAL/ksOBeGLZAmJlEc3xJi6l6ff15+u4B0= Received: from AM4PR0302CA0007.eurprd03.prod.outlook.com (2603:10a6:205:2::20) by DU5PR02MB10550.eurprd02.prod.outlook.com (2603:10a6:10:51a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9203.10; Sat, 11 Oct 2025 03:11:39 +0000 Received: from AMS0EPF00000198.eurprd05.prod.outlook.com (2603:10a6:205:2:cafe::5d) by AM4PR0302CA0007.outlook.office365.com (2603:10a6:205:2::20) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9203.10 via Frontend Transport; Sat, 11 Oct 2025 03:11:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=axis.com; Received-SPF: Pass (protection.outlook.com: domain of axis.com designates 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; pr=C Received: from mail.axis.com (195.60.68.100) by AMS0EPF00000198.mail.protection.outlook.com (10.167.16.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.9228.7 via Frontend Transport; Sat, 11 Oct 2025 03:11:39 +0000 Received: from se-mail02w.axis.com (10.20.40.8) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Sat, 11 Oct 2025 05:11:38 +0200 Received: from se-intmail02x.se.axis.com (10.4.0.28) by se-mail02w.axis.com (10.20.40.8) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Sat, 11 Oct 2025 05:11:38 +0200 Received: from pc56063-2339.se.axis.com (pc56063-2339.se.axis.com [10.92.3.2]) by se-intmail02x.se.axis.com (Postfix) with ESMTP id 857D11CA0 for ; Sat, 11 Oct 2025 05:11:38 +0200 (CEST) Received: by pc56063-2339.se.axis.com (Postfix, from userid 14323) id 5BDB81209E9; Sat, 11 Oct 2025 05:11:37 +0200 (CEST) From: Peter Kjellerstedt To: Subject: [PATCH 2/3] knotty: Some improvements to TerminalFilter.updateFooter() Date: Sat, 11 Oct 2025 05:11:34 +0200 Message-ID: <20251011031135.2243358-2-pkj@axis.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251011031135.2243358-1-pkj@axis.com> References: <20251011031135.2243358-1-pkj@axis.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF00000198:EE_|DU5PR02MB10550:EE_ X-MS-Office365-Filtering-Correlation-Id: d4acfcf2-0cd5-4baa-afdc-08de0873e55f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: 2HpZpDLt60kmRje6/sgYdDvZ2LEmKlCkIUfBRfBllKZdKghdb3PqyYTc5fg1RVv5oFdwHtEv4Siyb0Wtuxm9FQtE9w3yaFjOoQwqLFiNzJBBKmRap9CdfK6M2mEu16yN8V4HJU1iPKT9yIyPnkQMWCFRASrkVvgzRxN4XKJSRjDMMtk1m0EvcUrG+Efuk0kDpioCukhJVic7Zxf6z7u2wQP+HoDFx6X5/Ihr6fFdRVRcAM5If43+pWML9BwVsmM4ldD1FPWGY6lxuoBTvcTaAuBA6DyjSb2khzbJjvdePOitMYy+F3WKH/JBArA9LHooKTxTD8WHNNKBd26VbhOedKR0uA2EAZI4UYpm6Em86RElavDEroRsfGzmKsf1ROPqt/g+LgfWrW4F5L15CWKp9bASz3O/1/aCuvR0+pDtsa8NXBIP0YlD7oasGrCnFTpki+DlGMu0sic4xwDO16xb7qMv09UC2JhVXvx9ZJ/iLvVKBOkB6PQfoHMXxK9YkItNACGgPpXCqD14jeW5cTK/Eg6wFYekKJ8xrSgAANx1MijLtuHQ3ZwsV32TPEZC8RdWrk3TCUue0yI/KAg78g0jd2gPZ3UoCFkDULfu2/aPLhtGfezDE2EyWaYwJ3D20JiT2uduxjoSPVTzJgFs3ShE4pHaR/ibbllRCmuxZCB3uUojxackr4T/ccXptikJpEW67w+w+vQpLbodq+0LCzNbC9xddR/pMWDhPlvqzGMdWWyibTduU1fTzQCEPre5xL/+AvbPhrWZzQc4Jm8UiFDKLMRMrIvgyn8MLAZAL7R/JjCA/sbddz0+eSGb5/sN0/ye4N9nkw4ALxak5xS8rPeLokbSW+U3dpvgMEFp/5a7FuOHN36QDPIVmC/Xnedqel9Cihspm/LEwM5mFiojwS8IHQT8OyG4hVuG0p9XwntWhsAheJCQf/N/BJipPDUbjy9BPB+1LOv9lXRT4rKSz1hFERJoD6Gn19ZLn12PQ1BuCjvCcxMqJRKm+vNc4NCYxz+PMUnrkXxaREE3XC6WQlU5Qy2qnBLSYkXF5Mxf8k3e7Hc0XVoMEaLBLb9p1i2RzxclGKCs/VxKfujZn8suTbICxidfGef9TKOz+HreuBCZTRFrbJtkC2vVZXd85ASBG0KHrcmx0xsTU2N2VFo3VR05zcM1Ee9We71K1hYXm779mdjxIbVPX2lqF8WbUGVrYSANO8AhyFF1iQHcgV0WEtkVQuB5iXyHQm11+3a5vZPL8OD6kSa5dDSs7SncUx8cwi+C0NOIkwbzgRGx2SZ5DJUeY9wiC5pFZG4n2Udlaha2xYUD3bLGBmdw+CgMDABiygbgnTL8OtXnAV+uommKV/FrThAk9LLijqo4oVU/hkqWuPggjUMp9QqYnU4yxN930Rxj6sill6KZEMECaZCXyzP0gfhO8WCu3JJa1oNm+7kMW5ysf6i2nBYXImfeHLgMMu2h++ZhwSlGNwAxSBjILcF5R+1qunLL2zJjLTF6vho60YxjRbCjTEzmlkwzmXxgT9d+z/fIWoB5xvRTISypXsDkyy6qsAz2H+ljAJuKxeBOD3I= X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2025 03:11:39.5300 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d4acfcf2-0cd5-4baa-afdc-08de0873e55f X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF00000198.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU5PR02MB10550 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, 11 Oct 2025 03:11:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18170 * Correct/improve a couple of comments. * Iterate over the values (tasks) of activetasks rather than the keys (TIDs) as the TIDs were only used to lookup the tasks. Signed-off-by: Peter Kjellerstedt --- bitbake/lib/bb/ui/knotty.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 00258c80ff..6f03bf2faa 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py @@ -260,16 +260,16 @@ class TerminalFilter(object): self.helper.needUpdate = True need_update = self.helper.needUpdate else: - # Do not let to update faster then _DEFAULT_PRINT_INTERVAL + # Do not update faster than _DEFAULT_PRINT_INTERVAL # to avoid heavy print() flooding. need_update = self.helper.needUpdate and (deltatime > self._DEFAULT_PRINT_INTERVAL) - if self.footer_present and (not need_update): - # Footer update is not need. + if self.footer_present and not need_update: + # Footer update is not needed. return - else: - # Footer update is need and store its "lasttime" value. - self.lasttime = currenttime + + # Remember the time when the footer was last updated. + self.lasttime = currenttime self.helper.needUpdate = False if (not self.helper.tasknumber_total or self.helper.tasknumber_current == self.helper.tasknumber_total) and not len(activetasks): @@ -281,16 +281,16 @@ class TerminalFilter(object): self._footer_buf.seek(0) tasks = [] - for t in activetasks.keys(): - start_time = activetasks[t].get("starttime", None) + for task in activetasks.values(): + start_time = task.get("starttime", None) if start_time: - msg = "%s - %s (pid %s)" % (activetasks[t]["title"], self.elapsed(currenttime - start_time), activetasks[t]["pid"]) + msg = "%s - %s (pid %s)" % (task["title"], self.elapsed(currenttime - start_time), task["pid"]) else: - msg = "%s (pid %s)" % (activetasks[t]["title"], activetasks[t]["pid"]) - progress = activetasks[t].get("progress", None) + msg = "%s (pid %s)" % (task["title"], task["pid"]) + progress = task.get("progress", None) if progress is not None: - pbar = activetasks[t].get("progressbar", None) - rate = activetasks[t].get("rate", None) + pbar = task.get("progressbar", None) + rate = task.get("rate", None) if not pbar or pbar.bouncing != (progress < 0): if progress < 0: pbar = BBProgress("0: %s" % msg, 100, widgets=[' ', progressbar.BouncingSlider(), ''], extrapos=3, resize_handler=self.sigwinch_handle) @@ -299,7 +299,7 @@ class TerminalFilter(object): pbar = BBProgress("0: %s" % msg, 100, widgets=[' ', progressbar.Percentage(), ' ', progressbar.Bar(), ''], extrapos=5, resize_handler=self.sigwinch_handle) pbar.bouncing = False pbar.fd = self._footer_buf - activetasks[t]["progressbar"] = pbar + task["progressbar"] = pbar tasks.append((pbar, msg, progress, rate, start_time)) else: tasks.append(msg) From patchwork Sat Oct 11 03:11:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Kjellerstedt X-Patchwork-Id: 72067 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 6304ECCD18E for ; Sat, 11 Oct 2025 03:11:51 +0000 (UTC) Received: from DUZPR83CU001.outbound.protection.outlook.com (DUZPR83CU001.outbound.protection.outlook.com [52.101.66.51]) by mx.groups.io with SMTP id smtpd.web11.4392.1760152303761562808 for ; Fri, 10 Oct 2025 20:11:44 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@axis.com header.s=selector1 header.b=hJnw8i5X; spf=pass (domain: axis.com, ip: 52.101.66.51, mailfrom: peter.kjellerstedt@axis.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TxnhfxmaWjDKKI4D6eWgOMcRnxqwnqbdGMDyFndPL7zxng5j8IgZY103LWAQNTZVLsOo2chN6YdaTAxWb8IsIwflNrGo4LYuCzKrUuAaYckZwlPjl3S64iWYGH3/FIt9KjqklQ3rbXek5atq4Qa2Y8dxfyobh4vtglvDJ1w0RaHOAzUZG32YcyxzB+7mlV3BNATGRhNntyGvAiBd80g88ypXRmUHsLPZn0nuopKIteNxu/dfV+3kQ8AFHNgBijHGy5wQIPRb7eaFwiA7qdZZuQ5ZUKx0YZNw/2MDTwmKYHcv83JGKmcEUHw9gbxErh/+YSxte4y9W/h5Nw7Typhzvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=isQajEdVQ8geNoIoO3Dw6YsoWpMDk4HWPlhKY+HLyNk=; b=QjE9MLAEH6JvD6CwI43Lv2BUriBD+L/pfNnVW4Dxj4yxY2nHMpaq6N17gupJ2D83OAL1Jdj8N4tVMPqgvXy9oRMTjy/zOebCvU63Er9Xk558RfgnCj+pyKXjDPaRelQ76JPVTz7Et1swTqGc8ixxLc5cutnLWFqk9y830XG9wEMffqfOTGXKa4zll846upDY/AAveg7NtmEO805f3q7JQyCmApf1lQvGH3F6J2A4a9Gffk3s4HDaVztGII+Tfl7X0HkyF7i+LVoqtUM9gRtMkYlWP9BeLlLlGVO3KEEQlN2luqxHZ47oQJ0QoaWgQbswxS6OfM4M5gqM9UfCjIeYdw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 195.60.68.100) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=axis.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=isQajEdVQ8geNoIoO3Dw6YsoWpMDk4HWPlhKY+HLyNk=; b=hJnw8i5Xy6P5SoYrSiUim5oBR7ztM+ZW7Gn0a9BCprxxLqPTKZf60Pbv37Gxib/4RAe1Fi/oL1AVUa1+nDjtUUoVOPaAAk+X/WcD8pk403KHdFqVtOZfRv3w2AgRIAoCfEtVPwJODW5Zv/McNEQmv1tZAFnv2h5phQYKo0zIP68= Received: from DU7P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:552::8) by AS8PR02MB9960.eurprd02.prod.outlook.com (2603:10a6:20b:614::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9203.10; Sat, 11 Oct 2025 03:11:39 +0000 Received: from DB1PEPF000509EE.eurprd03.prod.outlook.com (2603:10a6:10:552:cafe::6f) by DU7P189CA0005.outlook.office365.com (2603:10a6:10:552::8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9203.10 via Frontend Transport; Sat, 11 Oct 2025 03:11:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=axis.com; Received-SPF: Pass (protection.outlook.com: domain of axis.com designates 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; pr=C Received: from mail.axis.com (195.60.68.100) by DB1PEPF000509EE.mail.protection.outlook.com (10.167.242.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.9203.9 via Frontend Transport; Sat, 11 Oct 2025 03:11:39 +0000 Received: from SE-MAIL21W.axis.com (10.20.40.16) by se-mail02w.axis.com (10.20.40.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Sat, 11 Oct 2025 05:11:38 +0200 Received: from se-mail01w.axis.com (10.20.40.7) by SE-MAIL21W.axis.com (10.20.40.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Sat, 11 Oct 2025 05:11:38 +0200 Received: from se-intmail02x.se.axis.com (10.4.0.28) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Sat, 11 Oct 2025 05:11:38 +0200 Received: from pc56063-2339.se.axis.com (pc56063-2339.se.axis.com [10.92.3.2]) by se-intmail02x.se.axis.com (Postfix) with ESMTP id 8703F1CBD for ; Sat, 11 Oct 2025 05:11:38 +0200 (CEST) Received: by pc56063-2339.se.axis.com (Postfix, from userid 14323) id 5D0D8120690; Sat, 11 Oct 2025 05:11:37 +0200 (CEST) From: Peter Kjellerstedt To: Subject: [PATCH 3/3] knotty, teamcity, tinfoil: Only allow one process progress bar at once Date: Sat, 11 Oct 2025 05:11:35 +0200 Message-ID: <20251011031135.2243358-3-pkj@axis.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251011031135.2243358-1-pkj@axis.com> References: <20251011031135.2243358-1-pkj@axis.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF000509EE:EE_|AS8PR02MB9960:EE_ X-MS-Office365-Filtering-Correlation-Id: afd0d963-1a7f-467f-581d-08de0873e511 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: 5WP1PP+NDZsolHjF89DUJtu4Fpyfhk9MCVMmOB4ZHMscE847wg1OqF/9lYIoeIH7ZOCzDLWSNHNO/YMBDNPBSJyLTLC4NnXEt3bp0P9lbgbcmvziumzme231Iu8Yj2+O8KgrNWniKD2n0cBt4HJ78t5OTaQYhweIC0Z8ytW7XE/AXXqvpbRqC/ArjPucC+QHP3UNV/5LucYhGx9AWyOIzb/6PmmhbvYuveTOzta/U0OLe8ny5MZjEdJOgmTRYQOTy98qkqXhW6Nuu03WupCdSY1Pz2LTQITvC4zfRvlTMg4GAxuOGXbtDR+bipmaiFLNqKupOXKuoNxgQNUq9Da7t6/jcSP7c7tfkvMNTP3HmLKuPg8p4AuASEYl7N7XerKsd2UP2D9+aYneZ1h8pCgWVVVJJS/hbz3iFr72tHb2T0Pf5HLvYNBcJStbAsEk7yVzuBgeCuTR/uy/n7CPhRKXVZc0lj3XFIgGOWV6D14v86p4wmUIHJb9uKGA+Bj10kucs/tHd38ZgGnvFwT1f4GIUHv37rYeKPTf1jP3Qc36I4/6B9xzPIUhbjfRozPixRKNDgwEJwdOr4DIgtb1H3pPtbzN6pc7NHGK5pp3GC9tYFn16KGrAv5l1wJgjESEgZ1MTKgqhKpmRRtEjnrGzSg/zboBXFmLQeWcenZnJSXcg/SMyQcVer41PDi4daRgoQ5Ov+gclS1RQucIoTE7e3aaU/STKJQBbm9od0OIOcD0SeRaNURSrP4rGx5Jh0ZBMQ9ERSdTjy8U7vkYldLvTMPu7RrWgRa/5hr12Y/vod8aHWPsjbYf6ylPb+DTdfbgHkz9Yw/yeWEi1mHqZY8UoJ/dpf1xXIrajQ6tuwwlAwNXaARJCrCc4wA0rNVCQrerDRLCK/4UmIRvgmJHHNUm1hgXmJHjidhyUP9YsKCqvOC+1N4ts9cq6dEXJPgN6kjZjUhf69ABjeF96fPk8KZKKH9wwaLxIk7pKChNWS5O8JdNFurfvPQj2tNS0Ppx+HdiYu1zOiT0zHFJOlO5QP0QbNV+g776WUb8j/mRhA07nsqsEcjYqTgEqGKRHA2wQMTXN2BQAzwScKglEJoRfA759yB6Hdk6PAVFbIgDA5mbuh66QG+OAw9s0z0utD2JnVI+McUtVobC86Qc0G9u/0cUC0yI90KbGYWUKQSk4hdD3aybB/KspXXfY/nW8o79EBuojSk9FuRel4nLhOSZtPHeXrx8NJxv82jKC00YUgaFWICpSLCWH4UOOYSqrBfEUD/zPZR3u8v1fgKZhu3n2ek0+9cucSysWEQRoyVg+VIfo0AmFUr6CLonfnxSn8L8m4lLTmi/UFDb6NKY9fYyS9ln4LD7fFwYYO7ReNckAjwpJciBUeL+C02nFT9CUErTBBoZjm0i2A79GSJYX+eE1CEXNUOEbv3W+2CYqg3+Wx8rCHpk8lV+7sAK3ugPDpoIV9IurwPxGyXHCsh3XYSdYJt3h6xNYHtwBiAjygu73nLtkvcEHEzUrQOYVUr9ps6UeBb919O8lcncWb//U2YgH9FgBOTni0MHFoWdmEpuyOUwue/3Cak= X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(376014)(82310400026)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2025 03:11:39.0059 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: afd0d963-1a7f-467f-581d-08de0873e511 X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF000509EE.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR02MB9960 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, 11 Oct 2025 03:11:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/18171 In case a process progress bar (e.g., "Initialising tasks") is active when a new one (e.g., "Checking sstate mirror object availability") is started, then finish the first one before starting the second. Also ignore ProcessProgress and ProcessFinished events that are not for the currently active progress bar. This also adds an id to BBProgress (initialized to the initial msg), which is not affected by calls to setmessage(). Signed-off-by: Peter Kjellerstedt --- bitbake/lib/bb/tinfoil.py | 10 +++++----- bitbake/lib/bb/ui/knotty.py | 12 +++++++----- bitbake/lib/bb/ui/teamcity.py | 14 +++++++++++--- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index e7fbcbca0a..0a8950e730 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py @@ -91,23 +91,23 @@ def wait_for(f): if isinstance(event, bb.event.ProcessStarted): if self.quiet > 1: continue + if parseprogress: + parseprogress,finish() parseprogress = bb.ui.knotty.new_progress(event.processname, event.total) parseprogress.start(False) continue if isinstance(event, bb.event.ProcessProgress): if self.quiet > 1: continue - if parseprogress: + if parseprogress and parseprogress.id == event.processname: parseprogress.update(event.progress) - else: - bb.warn("Got ProcessProgress event for something that never started?") continue if isinstance(event, bb.event.ProcessFinished): if self.quiet > 1: continue - if parseprogress: + if parseprogress and parseprogress.id == event.processname: parseprogress.finish() - parseprogress = None + parseprogress = None continue if isinstance(event, bb.command.CommandCompleted): result = True diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 6f03bf2faa..4bcf6bd12f 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py @@ -39,6 +39,7 @@ interactive = sys.stdout.isatty() class BBProgress(progressbar.ProgressBar): def __init__(self, msg, maxval, widgets=None, extrapos=-1, resize_handler=None): + self.id = msg self.msg = msg self.extrapos = extrapos if not widgets: @@ -84,6 +85,7 @@ class NonInteractiveProgress(object): fobj = sys.stdout def __init__(self, msg, maxval): + self.id = msg self.msg = msg self.maxval = maxval self.finished = False @@ -886,23 +888,23 @@ def main(server, eventHandler, params, tf = TerminalFilter): if params.options.quiet > 1: continue termfilter.clearFooter() + if parseprogress: + parseprogress.finish() parseprogress = new_progress(event.processname, event.total) parseprogress.start(False) continue if isinstance(event, bb.event.ProcessProgress): if params.options.quiet > 1: continue - if parseprogress: + if parseprogress and parseprogress.id == event.processname: parseprogress.update(event.progress) - else: - bb.warn("Got ProcessProgress event for someting that never started?") continue if isinstance(event, bb.event.ProcessFinished): if params.options.quiet > 1: continue - if parseprogress: + if parseprogress and parseprogress.id == event.processname: parseprogress.finish() - parseprogress = None + parseprogress = None continue # ignore diff --git a/bitbake/lib/bb/ui/teamcity.py b/bitbake/lib/bb/ui/teamcity.py index 7eeaab8d63..3177f4aaf4 100644 --- a/bitbake/lib/bb/ui/teamcity.py +++ b/bitbake/lib/bb/ui/teamcity.py @@ -200,6 +200,7 @@ def main(server, eventHandler, params): logger.error("XMLRPC Fault getting commandline: {0}".format(x)) return 1 + active_process = None active_process_total = None is_tasks_running = False @@ -300,16 +301,23 @@ def main(server, eventHandler, params): if isinstance(event, bb.event.ProcessStarted): if event.processname in ["Initialising tasks", "Checking sstate mirror object availability"]: + if active_process: + ui.progress(active_process, 100) + ui.block_end() + active_process = event.processname active_process_total = event.total ui.block_start(event.processname) if isinstance(event, bb.event.ProcessFinished): if event.processname in ["Initialising tasks", "Checking sstate mirror object availability"]: - ui.progress(event.processname, 100) - ui.block_end() + if active_process and active_process == event.processname: + ui.progress(event.processname, 100) + ui.block_end() + active_process = None if isinstance(event, bb.event.ProcessProgress): if event.processname in ["Initialising tasks", "Checking sstate mirror object availability"] and active_process_total != 0: - ui.progress(event.processname, event.progress * 100 / active_process_total) + if active_process and active_process == event.processname: + ui.progress(event.processname, event.progress * 100 / active_process_total) if isinstance(event, bb.event.CacheLoadStarted): ui.block_start("Loading cache") if isinstance(event, bb.event.CacheLoadProgress):