From patchwork Tue Jan 7 21:54:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "chris.laplante@agilent.com" X-Patchwork-Id: 55172 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 77F1BE77197 for ; Tue, 7 Jan 2025 21:56:36 +0000 (UTC) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.70]) by mx.groups.io with SMTP id smtpd.web11.4658.1736286992917912537 for ; Tue, 07 Jan 2025 13:56:33 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@agilent.com header.s=selector1 header.b=XZE5j9hD; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: agilent.com, ip: 40.107.220.70, mailfrom: chris.laplante@agilent.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oROqpThYQaVTEYhtMpn2OFeLQ5GVDIc2mI04dpwTbgS19zoWl1oEfPp47bYfT+J6wnhKURKCbPCn35Yc+pbxrjVekm3C5hKGZ5x8juPv8FiWSDZJpwbOZ2U6+YFWe5QTstWUUIGnAVhgUTbgO8mXNyBRhfex0zFSxWhg5aGbZzOqdRbdA5usKHcA8gza0NUHBBbw/3cuDXJveqOwapbVNDpz3BOxCiQxKrj8FHdgF3m5tb2Wb8e0cMt5IS3Zgw3bDqNJ/4WQSYWtMEhP2tS20FTKfF2mlPFIkv8LeoMc/y1ByEEzSLYhtyIbnRHwl7z/x++3X0U2zpbPXEcsGpziwg== 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=qGo2JidcDtrzql1l4Xs0O7kDYBh8S4Q60n2U+xpvneQ=; b=QQJOnul2Z03KTuTksgi40VyxNQCrkqi7Mdx2+u2wWLq/xYpWtIYsc7d9efPDyGx08zzKej9m53ikvpEnC8WtUlCo9jXzhrP8JKZRB+wPRIEqfj6IvAYrjsjEdsthu3F2tXCjpYAMFBMoXl5iU1fjVnqNMAJgdbQW0GP9FRch1mX40LD6Yr0Fec2RNb1kpgUs/L6drkOg6Pu5wXw2wgbSqzob5Uct7S6TUgKL2fmH4QFjMmA52jEo++wEjmsM1r0YyKsZMpYz5RYXSYIZdZK6EJfsSy9PHl0EYV24izrD7ZPCS2oOxtE8eff01JDgF+0pq5t01T0hkkBvyKdwtJ8vyQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.25.218.34) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=agilent.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=agilent.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agilent.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qGo2JidcDtrzql1l4Xs0O7kDYBh8S4Q60n2U+xpvneQ=; b=XZE5j9hDWpXy+iSefkHlAcg/L9SS6IhKQvKgUf3rcUpsBBc/olaYRuj0pl2tvDWarQ1jWSPn8dNPc6LNWMRt0F7kc+7B7OOyPCFfakTbu9pbKh0zSOkwIigc9cUZ/s40cqgAfTpSGNU8R1wBz3GyeeqxQXY/Ij93SVFtUZ02hRhHm+/Nh6kw6FJeBu0FfgovA1YzGdFZ5ku0PCddbujIIijQxvwgS1z48MOulU5EOpxykP+A4oG8ZH9sgQTq90boIGiu+Xvu922r5FxJlKSPm/lcZeEnjLLg4Jt+QnEK2k8A0DhFM6stmhe+Zkj1HMkc/sBo80Zes8D88ioVK45AbQ== Received: from SJ0PR13CA0150.namprd13.prod.outlook.com (2603:10b6:a03:2c6::35) by DS0PR12MB9321.namprd12.prod.outlook.com (2603:10b6:8:1b8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8314.18; Tue, 7 Jan 2025 21:56:25 +0000 Received: from MWH0EPF000989EA.namprd02.prod.outlook.com (2603:10b6:a03:2c6:cafe::16) by SJ0PR13CA0150.outlook.office365.com (2603:10b6:a03:2c6::35) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8335.10 via Frontend Transport; Tue, 7 Jan 2025 21:56:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.25.218.34) smtp.mailfrom=agilent.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=agilent.com; Received-SPF: Pass (protection.outlook.com: domain of agilent.com designates 192.25.218.34 as permitted sender) receiver=protection.outlook.com; client-ip=192.25.218.34; helo=edgeappmail.agilent.com; pr=C Received: from edgeappmail.agilent.com (192.25.218.34) by MWH0EPF000989EA.mail.protection.outlook.com (10.167.241.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.7 via Frontend Transport; Tue, 7 Jan 2025 21:56:24 +0000 Received: from laplante-B650.lfs.agilent.com (192.25.126.5) by edgeappmail.agilent.com (192.25.218.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 7 Jan 2025 14:56:19 -0700 From: To: CC: , Chris Laplante , Richard Purdie Subject: [scarthgap][2.8][PATCH 1/3] ui/knotty: print log paths for failed tasks in summary Date: Tue, 7 Jan 2025 16:54:01 -0500 Message-ID: <20250107215403.251838-1-chris.laplante@agilent.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EA:EE_|DS0PR12MB9321:EE_ X-MS-Office365-Filtering-Correlation-Id: 50317ed0-fcbf-445a-ee3d-08dd2f6620ee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: S5eRjrGMmVHzPck++ZHLkLN1GKCXgDJQ0VMxVfRWzchO4KESb7izCaf+mZw6yWjJe9uFYm1mqNHEhkcKXVUM7Afvar8lh8uRh85hlAIhPmTcTCHP7M2SKIMWEPRQiTHPD8IKQ1MwvjQBvBGy+UtVLVURTgve7MxfKxWRJq0STIGbagdBiDHQRzGgPCoiHRd4i2YT5ruaOc1Eyl1LAVpAF0pxqXVgdv7OHUEdhJT4owJmzlB1iILSoVoiH4TePyQdewTnwB8AkZuyZOhoqCBwg1EZh8syaAET5uWDOeuhdzLXXHgkskBinyIACAcVOHhzDn/EqhkIegpZGfLMO2YsQ08gBTsGimpyxEWda2D/He8loReF7Xx2qL11Lp3k13NksKhskbYJMKAICLSTuW+SM/F74kDcQTNsvkphDZrTGDPPGzqX1O2hkK6gwh2STHwJGebyF9oqXwHLgTpx+U6u9nWGFC3u0I1P9rmlvDKo2PVVPKGAaWg9SJnbJNdLDIWOMRcW1GClOHnRgX/OsA25kkd1Kpd1OyMbPB7oe6Rg1aYmWzyM33Ly/TU1Wb9BQowbO8YSExMOaFaxjP5X4gV77DjZWRjZemoqPdk/MxQCFoxDsHVLVeIDorJnHQrMxZNoV2QxBLcE61tk9LLOPC7b1nkXIArfnXB0ThyUr4p9A09B1ImdLJi6uG60fIMtjaH35oJ9xCHyT0nAc54Tub5o/2iqHVr6FZreMCpTNZyrNxg/qAz68jmRwY0340sIa/MWGitCRJMmTo/YmzYFGnNK0MeB3xTK+gL8c8y0qBSsXiyQsEd+5oU2J38TNYPiga5drk77YPDP1C0RuF1xUVy/iGfQn81SCj07DNI/zXeU6dp/qkSMiqAN2YIrXVvwJtssDcw9hr5CuyNB2erohCg9fCQO4ud6hhlWvt5kHJgivnqv51ffINl/n9cFIV99PIvK4PhKWFhx+TbJ7guEeRArnqTylgvuehCt29kv9xCULy85NE7Vz9mGmQYWPkpNIsS2rgfxtVyJsJ7NxM+3pyimwA6YAjfyJhDYRjIaEbr0bbcexbjNxnT5xdN7tb2po69NVSQswOZVQ7uBuAHDDd8nQW0erAbVJ60VKbHKFXMQ15eakaqYW2i9muhTHgurS/ofoi6ITmmHw/nyH6DBMBUaMSlhWlkGilALh7reOvVxYTTnNmqnxtnvLQV1Fn1ylyzTYYadw5+is3FICVyIRV8mcucMPWBEsB7Y5bZrDqxvWHoXt2f4nuaTzJpqvm6XVlhaadzDFvcWbo7UsDtSj41f1mVE5E65G6DXW7IBpZ5V94PscDDBm4m/v9chleOaMkt5mU0ppAgdNQ5SiLAgbfxs8i19z8CwGGjgV34JpXCCGPxL3ZQCCCyqY3/zZsUg3Q5Bi6CgirAVEQ9j91xdB3jb4Vp9yDUAxACpYl18dCbRThY= X-Forefront-Antispam-Report: CIP:192.25.218.34;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:edgeappmail.agilent.com;PTR:wpcosapexchedg3.windmz.agilent.com;CAT:NONE;SFS:(13230040)(376014)(1800799024)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: agilent.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2025 21:56:24.1083 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 50317ed0-fcbf-445a-ee3d-08dd2f6620ee X-MS-Exchange-CrossTenant-Id: a9c0bc09-8b46-4206-9351-2ba12fb4a5c0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a9c0bc09-8b46-4206-9351-2ba12fb4a5c0;Ip=[192.25.218.34];Helo=[edgeappmail.agilent.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-MWH0EPF000989EA.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB9321 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 ; Tue, 07 Jan 2025 21:56:36 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/16984 From: Chris Laplante When tasks fail, it's very frustrating to have to scroll up to find the log path(s). Many of us have the muscle memory to navigate to the 'temp' directories under tmp/work/, but new users do not. This change enhances the final summary to include log paths (reported via bb.build.TaskFailed events). Here's an example: NOTE: Tasks Summary: Attempted 856 tasks of which 853 didn't need to be rerun and 3 failed. Summary: 3 tasks failed: virtual:native:/home/chris/repos/poky/meta/recipes-core/ncurses/ncurses_6.5.bb:do_fetch log: /home/chris/repos/poky/build/tmp/work/x86_64-linux/ncurses-native/6.5/temp/log.do_fetch.1253462 /home/chris/repos/poky/meta/recipes-core/ncurses/ncurses_6.5.bb:do_fetch log: /home/chris/repos/poky/build/tmp/work/core2-64-poky-linux/ncurses/6.5/temp/log.do_fetch.1253466 virtual:nativesdk:/home/chris/repos/poky/meta/recipes-core/ncurses/ncurses_6.5.bb:do_fetch log: /home/chris/repos/poky/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-ncurses/6.5/temp/log.do_fetch.1253467 Summary: There were 3 WARNING messages. Summary: There were 6 ERROR messages, returning a non-zero exit code. Each log is rendered as a clickable hyperlink in the terminal. See https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda Signed-off-by: Chris Laplante Signed-off-by: Richard Purdie --- lib/bb/ui/knotty.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py index f86999bb0..5956ab177 100644 --- a/lib/bb/ui/knotty.py +++ b/lib/bb/ui/knotty.py @@ -640,7 +640,7 @@ def main(server, eventHandler, params, tf = TerminalFilter): return_value = 0 errors = 0 warnings = 0 - taskfailures = [] + taskfailures = {} printintervaldelta = 10 * 60 # 10 minutes printinterval = printintervaldelta @@ -726,6 +726,8 @@ def main(server, eventHandler, params, tf = TerminalFilter): if isinstance(event, bb.build.TaskFailed): return_value = 1 print_event_log(event, includelogs, loglines, termfilter) + k = "{}:{}".format(event._fn, event._task) + taskfailures[k] = event.logfile if isinstance(event, bb.build.TaskBase): logger.info(event._message) continue @@ -821,7 +823,7 @@ def main(server, eventHandler, params, tf = TerminalFilter): if isinstance(event, bb.runqueue.runQueueTaskFailed): return_value = 1 - taskfailures.append(event.taskstring) + taskfailures.setdefault(event.taskstring) logger.error(str(event)) continue @@ -942,11 +944,19 @@ def main(server, eventHandler, params, tf = TerminalFilter): try: termfilter.clearFooter() summary = "" + def print_hyperlink(url, link_text): + start = f'\033]8;;{url}\033\\' + end = '\033]8;;\033\\' + return f'{start}{link_text}{end}' + if taskfailures: summary += pluralise("\nSummary: %s task failed:", "\nSummary: %s tasks failed:", len(taskfailures)) - for failure in taskfailures: + for (failure, log_file) in taskfailures.items(): summary += "\n %s" % failure + if log_file: + hyperlink = print_hyperlink(f"file://{log_file}", log_file) + summary += "\n log: {}".format(hyperlink) if warnings: summary += pluralise("\nSummary: There was %s WARNING message.", "\nSummary: There were %s WARNING messages.", warnings) From patchwork Tue Jan 7 21:54:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "chris.laplante@agilent.com" X-Patchwork-Id: 55173 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 65FF7E77197 for ; Tue, 7 Jan 2025 21:56:46 +0000 (UTC) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.77]) by mx.groups.io with SMTP id smtpd.web11.4663.1736286998993525899 for ; Tue, 07 Jan 2025 13:56:39 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@agilent.com header.s=selector1 header.b=WclwP38T; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: agilent.com, ip: 40.107.237.77, mailfrom: chris.laplante@agilent.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BJ/U84q9UQWzg4Yq8xRw7ayiRKNviC2+dBXVQ3A7qOgEtWVLu8/Z/R+YkpxkeBoNpYCg3vj7G7CI8f63M/DXjHfpduEGS2ByjBv2PP1Vu5GEjAMgRMXBz0yogTgQog3Ozpr/dd04lwl2eW350qzqSyl8n3UktrIpBxWmfmzRBN1Aozox/r5XdDeG6qOuMzaO4kY50zLjruWFLS/WGO+VHy8ELP1Z5aqSTkiJMrzbDHbAslDO/eUMFgVzzjnWH06ZfF06eWz+qYtv0YcSTAGjFoQlkuQSmXDQuX3ve/ITNikxlc1YDhf37sgnCM2Bj+TGDgmg03kfhHlzkz76dI8wbg== 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=c3Fwj3o6MZyc1n1wk54/5JxYl0UtBUjEKVE2hwA6hqg=; b=N0Or2nDPeygW4TjGzUZAd1WWmJY15SBHoe9X9xCiOKqRzXZzSgd4KOUCmRt1W3VHQ4SWWQ53KQ/CicZ7OjLzDuGwxZqxmwgrVMbssJskyJb834Pp3Udw3EYGCSOC/u9JjmnCOUiHXYsJpJmrSS50ewQRuK6jtfDZodfWW3EDqUqbyRR/7KfdS3oHsTtA/x9j3Y1Jn+9HNMOJ4R24FaCZONh5hpFZ7Y/zrIkex8cuXAm2kQ5xFLQZXZwhxch81EOSxh3YfmaOKBsGRysox/KVgpl+v1ajzeugJFeCWJQSMz2YkxXOXHmtGchIs/lvSAMtPWaOuuWg7qQj+5NVO+RNig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.25.218.34) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=agilent.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=agilent.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agilent.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c3Fwj3o6MZyc1n1wk54/5JxYl0UtBUjEKVE2hwA6hqg=; b=WclwP38TBOVk60LcDj9hK4FfToH1Vr35nxyk0/Wkt7Gu36pRnfDOAOsKHbJ2mUcBkqAzGhlKWaxa2tO0wUe3F6xLuy5JwM8GNNkuzWyl8Yan7+3KxJmZUiRJxd4pMOSNQHRmwW6MusmTLHdL6GQ4Lu6VZ90NZepfIHowtKYpkGB0CQ6ppsb7D04HbhfaxTF98nTOoXPluRXB6DCsJYBdM+p1PST4ju4PZPC44C15w5H14ZXcvBOFIOwJzXbi0OgY+3kzxGpmJR7VmsWwusUp6aKjn6l7xdJHMzoxiu9T1Umnwqw3yEvMN2kRfNiFAz4zZZlEVx4sxI9Qdsxw35+aPg== Received: from SJ0PR13CA0053.namprd13.prod.outlook.com (2603:10b6:a03:2c2::28) by SJ2PR12MB7800.namprd12.prod.outlook.com (2603:10b6:a03:4c1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8314.16; Tue, 7 Jan 2025 21:56:29 +0000 Received: from MWH0EPF000989EB.namprd02.prod.outlook.com (2603:10b6:a03:2c2:cafe::2c) by SJ0PR13CA0053.outlook.office365.com (2603:10b6:a03:2c2::28) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8335.10 via Frontend Transport; Tue, 7 Jan 2025 21:56:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.25.218.34) smtp.mailfrom=agilent.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=agilent.com; Received-SPF: Pass (protection.outlook.com: domain of agilent.com designates 192.25.218.34 as permitted sender) receiver=protection.outlook.com; client-ip=192.25.218.34; helo=edgeappmail.agilent.com; pr=C Received: from edgeappmail.agilent.com (192.25.218.34) by MWH0EPF000989EB.mail.protection.outlook.com (10.167.241.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.7 via Frontend Transport; Tue, 7 Jan 2025 21:56:28 +0000 Received: from laplante-B650.lfs.agilent.com (192.25.126.5) by edgeappmail.agilent.com (192.25.218.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 7 Jan 2025 14:56:24 -0700 From: To: CC: , Chris Laplante , Richard Purdie Subject: [scarthgap][2.8][PATCH 2/3] ui/knotty: respect NO_COLOR & check for tty; rename print_hyperlink => format_hyperlink Date: Tue, 7 Jan 2025 16:54:02 -0500 Message-ID: <20250107215403.251838-2-chris.laplante@agilent.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250107215403.251838-1-chris.laplante@agilent.com> References: <20250107215403.251838-1-chris.laplante@agilent.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EB:EE_|SJ2PR12MB7800:EE_ X-MS-Office365-Filtering-Correlation-Id: 153e05fb-ae86-4846-76f3-08dd2f6623c7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: vinhCLVhhxaHgkUeYEwkOG8SN11I1dfSecjXwAZzkDtHGbWLaOTgbKtkMuJ75zDuRDSTszH+6BbRyaA9AajsJGnzzQhWvQv1VjTdpGtVrOCFdilVojgHUNHq/SyTGjKNWbInpOeWmxqdNmsuDQ9VqhJEbyH/tgW7crCzqOxxqLaRb7yHhb3SAASWVASQiFkS7OzdtwCP/MddV23iQT+Yud6soauxt0XnW5E6bF371kWx3K2IK1t5kX/1cqBVS9fmCuuF20/k2mK5lo5EAQSnxP6B4CU/J/RzENxOOwLa8EicRWWlXXv0mTC9Oc3ese93xJbjGYCE7SliGymxHZsSE7+7fAYG38/mPTOORZQEeSXuYlmk2oJBYA5mecHK7Sks7njXkOCKnlVU3vB8W9Ad7NSOQsyO2mHK2tAvhSHaoGgYJnDBj2W7bBVqsidP4EjBWzbT6PqNwR7PIFLmtFJc7k70srtxxcmI171HOlGErhJ61/ngEOOq9TJns7g/jZtrnAjwdIs3JleMBZm8yhz5v21w0B3v0oX7RDXfWtgn4d1Hap0trj8CAFdlgfMU2QBIP2wAzVQiZK0AoXbfRknyiedsgoj+ben6WOEmOAzco2zX73VY/vqpNS7wuTvxJFHjIEt+CDPV0abwKapBApkG6ZbL2N28VqrLzgiPMOUz/tb7P7Oa5VxlI3yD1eSy+0E/U9tGNWUezDJRWs/QLMx8XK9PqbxBeSuf0VTq+gO4+O0pJalubzMBT/MbFV+AlJQ9kmVyXh+yr1Pf0ofLcJfOXq4v2p2eq2JHu5T4V4heisNe1WgNSLdCVAuuz7asb/JQHD8Twi1cCLE0it9ZQeZKxbxHC1hRV7Ympa1kdk6VZnSmwopW4TwCg8dxgOYzoCU6SItknotHbeslTTx+GmrsGPqtMxwom5Fgm0EQJSnaqgW2exu02R5nFd9vATbspNd2ylqkesvUAObMk4aJysSn9DwBrHDqhqO+Ohd+h2x1LadrgkbFfAUzBu69dDhImnBnmS5qAN4Xz0sMO6fYHPs1aqTrDKFkH8w573iQt/AmPRthm/8U5WIVU6gR6v3ifygwOCOLbeJiYLM26ykmUqY8qkrhuqGeM8UoHw+pwPmKlgCTEdR1rb1mkVSgn3+zlWmK+Rfevwyf2fQiTuk0W1lKNEmj2tZgvc2zkREsOPsGKSYrTMCeakAmEuWFLbOjA5lNsYQbQto0b7RU14Zh7VuFT5VKmgg2tDL2G84hmm7vuzpVj+lpmOpFOrJqIE3AjbJhReWfBcplQjpmALMzLlbU2sLHLX0lNxcsHv9Jey3u7DuSGhWgAlRNZkcDi1RoleaZf3R1z7ux7d1PkzCv98vLgzscmm7qEZySkezPE7r2TqMOFYTFQg9BKGrwaNjHFkp7M8KfvhGMQtcone62+2oNXueEv628YstdpQteSdg1NLyMphMSUnAh3RY1mCRbTdzV/mFyUVY56yKDJqMKfB7Zb9YsVNorfs1XC6NmEeLtRSE= X-Forefront-Antispam-Report: CIP:192.25.218.34;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:edgeappmail.agilent.com;PTR:wpcosapexchedg3.windmz.agilent.com;CAT:NONE;SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: agilent.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2025 21:56:28.8829 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 153e05fb-ae86-4846-76f3-08dd2f6623c7 X-MS-Exchange-CrossTenant-Id: a9c0bc09-8b46-4206-9351-2ba12fb4a5c0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a9c0bc09-8b46-4206-9351-2ba12fb4a5c0;Ip=[192.25.218.34];Helo=[edgeappmail.agilent.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-MWH0EPF000989EB.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB7800 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 ; Tue, 07 Jan 2025 21:56:46 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/16985 From: Chris Laplante Signed-off-by: Richard Purdie --- lib/bb/ui/knotty.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py index 5956ab177..3784c93ad 100644 --- a/lib/bb/ui/knotty.py +++ b/lib/bb/ui/knotty.py @@ -577,6 +577,8 @@ def main(server, eventHandler, params, tf = TerminalFilter): else: log_exec_tty = False + should_print_hyperlinks = sys.stdout.isatty() and os.environ.get('NO_COLOR', '') == '' + helper = uihelper.BBUIHelper() # Look for the specially designated handlers which need to be passed to the @@ -944,10 +946,12 @@ def main(server, eventHandler, params, tf = TerminalFilter): try: termfilter.clearFooter() summary = "" - def print_hyperlink(url, link_text): - start = f'\033]8;;{url}\033\\' - end = '\033]8;;\033\\' - return f'{start}{link_text}{end}' + def format_hyperlink(url, link_text): + if should_print_hyperlinks: + start = f'\033]8;;{url}\033\\' + end = '\033]8;;\033\\' + return f'{start}{link_text}{end}' + return link_text if taskfailures: summary += pluralise("\nSummary: %s task failed:", @@ -955,7 +959,7 @@ def main(server, eventHandler, params, tf = TerminalFilter): for (failure, log_file) in taskfailures.items(): summary += "\n %s" % failure if log_file: - hyperlink = print_hyperlink(f"file://{log_file}", log_file) + hyperlink = format_hyperlink(f"file://{log_file}", log_file) summary += "\n log: {}".format(hyperlink) if warnings: summary += pluralise("\nSummary: There was %s WARNING message.", From patchwork Tue Jan 7 21:54:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "chris.laplante@agilent.com" X-Patchwork-Id: 55174 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 68133E77199 for ; Tue, 7 Jan 2025 21:56:46 +0000 (UTC) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (NAM02-BN1-obe.outbound.protection.outlook.com [40.107.212.45]) by mx.groups.io with SMTP id smtpd.web11.4664.1736286999935278667 for ; Tue, 07 Jan 2025 13:56:40 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@agilent.com header.s=selector1 header.b=LLAf3zq8; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: agilent.com, ip: 40.107.212.45, mailfrom: chris.laplante@agilent.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RXvL5z5LGsqIv7fGmjfNcAjbtjaCc/ACfDpB7sYWTyeBvTZWaekMCD2WD73bNIeR6n/eMuMMPfbsX45vtowlP8un14SJtrhfIKRg8V6yNemnkpGcaD7DTnM55c6sDd72oPx+lKZvxYVfor3WxiwCK1io0yJtGQYM/hNvjRSwF3kr7wPTJ/IzaNIQmwhjWlak1uGw8cP4wrrq9hW1c8FHKxshyPuaSB81IPuY2eMvD8xAeWDpAtDJ/FvMNfgsVHE1bUGiTu9nNsnWDaO/dYLaG20jWawxLj+xOdi34i5aL7fUIYJvfo99TMs+pnFJE105G+sMAJvTv2wEoyKj63mR7Q== 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=BDR0Y22Z5ZCIX9e1lmfzR7rbhGygFhHav9G7ca/BoIc=; b=g1od7H6DrIwCZmFRaDMUHN2ffm2dVmbTq+JW3+n4xgBF4x497SHHi7wnhtF14HsBg7lyJyITWfNxDD2uk9JsV2oWCCJ0lGpj8iwk/6xOr2z3kF6WvoNmzAi+TwjFJ+gUAIzAdxLs+qRKsKLfRWRtOjgVOdG1M+ekyLDmlMVzXd76HleIQJe7xNatbqaKizeoJDPt+b/Md4nAD8UGj9m0C7oCwtLax93rOc17SkLb7dRy1eDQYijYoH+dqEyy+8keEI7hp7mkq1p1peFysJ60Qw53QxCcZ4A6cdI2bNTuLrcKx9lofIYPdD4ce/UTr/At4qxABQnov/leh8tcFaKLvw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.25.218.34) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=agilent.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=agilent.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agilent.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BDR0Y22Z5ZCIX9e1lmfzR7rbhGygFhHav9G7ca/BoIc=; b=LLAf3zq8u+6zakOZdhSZUS0WHR0UVnFTrmADqa8aYc24XPHbq8wIrWKpSmHakdMYA/kN+k2v0x+wqYfB3PYcNMwOVP4pPCDhEADVPcjBVQT9owLe/THfRFDOVOzwAS4QSrZ/AgwyjgFtlXVdrU43JDaQIBFjjHnDLs0K+UtPjhOQ7+Cw6MEevjj+zfuuveJmlJiuiPvXVXCL0plCjTrPtENa+2EC8hrwt2DtjZTtwMM33IRfd9YNSqYRhOi3vIcrEMWRx12lvcrP8YNAxlNAHpKnX4Nm73orKwabx0ZULUer4NfYG3yBfzpC4uIAL0XCX74tuyef6ujL4xkMAjzitQ== Received: from SJ0PR03CA0255.namprd03.prod.outlook.com (2603:10b6:a03:3a0::20) by DM4PR12MB6325.namprd12.prod.outlook.com (2603:10b6:8:a4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8314.18; Tue, 7 Jan 2025 21:56:35 +0000 Received: from MWH0EPF000989EC.namprd02.prod.outlook.com (2603:10b6:a03:3a0:cafe::18) by SJ0PR03CA0255.outlook.office365.com (2603:10b6:a03:3a0::20) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8335.10 via Frontend Transport; Tue, 7 Jan 2025 21:56:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.25.218.34) smtp.mailfrom=agilent.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=agilent.com; Received-SPF: Pass (protection.outlook.com: domain of agilent.com designates 192.25.218.34 as permitted sender) receiver=protection.outlook.com; client-ip=192.25.218.34; helo=edgeappmail.agilent.com; pr=C Received: from edgeappmail.agilent.com (192.25.218.34) by MWH0EPF000989EC.mail.protection.outlook.com (10.167.241.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.7 via Frontend Transport; Tue, 7 Jan 2025 21:56:35 +0000 Received: from laplante-B650.lfs.agilent.com (192.25.126.5) by edgeappmail.agilent.com (192.25.218.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 7 Jan 2025 14:56:30 -0700 From: To: CC: , Chris Laplante , Richard Purdie Subject: [scarthgap][2.8][PATCH 3/3] cooker: Make cooker 'skiplist' per-multiconfig/mc Date: Tue, 7 Jan 2025 16:54:03 -0500 Message-ID: <20250107215403.251838-3-chris.laplante@agilent.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250107215403.251838-1-chris.laplante@agilent.com> References: <20250107215403.251838-1-chris.laplante@agilent.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EC:EE_|DM4PR12MB6325:EE_ X-MS-Office365-Filtering-Correlation-Id: 157cb87c-2c50-414c-8a00-08dd2f66277d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info: UBox++GxCnyaBf69jOBIaD6TF+w4jREQMT33V7wacdmc3/bAnh2F3Yu10dBFHLNtsoXm7sM8CWgkf5i8eRVOtPEuUmcvTXdrTE8nYTpq2iFQXbAQ1Q554oXaozkBkjeFkZTDEoICDpQLVfZps21w5zX/W2XycUuZLgcQOKCsN4T1ibITHsICJ7MdNI9E1nNkJ2NWnaJwU/RNsG5Cb28hC8rDWg5CcOrO3Lqh8qYuri8Dr7jhpKPAG98tsfBQTSXnwpaFJg+0FCcg1lgZ/04Y6rmaM/KpJjKKctgXwpsVYOQp11fSGoGAnrQWcxgXp8qPtLVe8WmI4nnJQbYO21s7/AZytzztFCft5ywYlg87yKh/j72RdlSVQoWivOiSN9NxSgDPPdJWLdh1KLsDEVGbY6T2G+58sNVsKTji9Ggth5Jv/5D1NVSwUI+N7GDpdfklLxN7WCRUMvgCkm108aYM/lJCS348ytRFG6YvtdquQbT2fxE6F/F33Le6lfIIEyLbwhD+LN79mzBUnRJFt6Uub/4wyBUtROaR4eWZy3i9gYaYCN2X5EHmOFDsYq7ncAaf6tgQk9bnYoCo/WLLzGyka/gxHZ+aoWRFn3wZUrYw62yphLLMUUEMaRr/U8SJKACiUKLIFV0T7Hz85Cn3fbSw09h5lJldO/1WcEepmrZoxK9H3/MqXB5heZq0apyFC9Ya0XvImW8p/Xk73UBHKKmVUdM+fkZyQqloI1967iwva+8SIflSZGrqwXdgy9h/FxM9vK8kzbodFhq3ANYvUkcl0+u/R4O81PFvZNig3zbjJqy9QtYWK/Th1b65XDHREeY08lOI92C625PO3KLFDPCFIcVOJeJKUhMD4L9p5ZyIMdKKdCmyAw8ohC8KZ1iIsMEIZ7cbk3j/kRFW645gs27SPk7SBRJKIbzGKeBeJPPKB328uVJu/Uhf13ZDEDg0l+a6Egh9q5nfg52tNhsunlhNFqmeo6BUmbrXzOeat6IA1h6Rqcvdcd4EFzKuBBNShutCDx0J7mpUWdhuWmFxWRRU/ZHEkIbL53S8BhsODyaEkuUSE0mX+H6uveZ7laUoxhU6T+9q3xHsLbdJxboH2uJzpho3ALE0iHnDRVhOhHOkaNmFTdrLKWwVjMHiJu0hrICVEjQlUwJx3bbnhYfeAghIAb7K8ECnPJVd6Bhn5r267NAuNjAs8/G4GtP/9S2kWbNX0SQf5Qz3eaiv30/7KEG1SGdmXgPJ1R3ebv+wP5fvleBrh6iUFbC957G+bTvoFqDBxZJvrSpvf03TnGMBbRItOYncuNZcvoR8OoWQcumYw9tHr6qFrlQf2d/bZ+291c2YY1yrowGYOC8kZQwi0J9mmpWcCZpTK4/GncKHl2/dsGMhbTn/ba1G0loxwHtF4mapW3+ZldX08TSUDg9IPTIGrQ+LAI3Y45wwd61vcxyoeY+MpKKGNmVyP+RNOwE3AOBvLauBfc9DZMPAqt7SWXj41eqZKGDRgTTnWyPe3ud7GTo= X-Forefront-Antispam-Report: CIP:192.25.218.34;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:edgeappmail.agilent.com;PTR:wpcosapexchedg3.windmz.agilent.com;CAT:NONE;SFS:(13230040)(82310400026)(36860700013)(376014)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: agilent.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2025 21:56:35.0468 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 157cb87c-2c50-414c-8a00-08dd2f66277d X-MS-Exchange-CrossTenant-Id: a9c0bc09-8b46-4206-9351-2ba12fb4a5c0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a9c0bc09-8b46-4206-9351-2ba12fb4a5c0;Ip=[192.25.218.34];Helo=[edgeappmail.agilent.com] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-MWH0EPF000989EC.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6325 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 ; Tue, 07 Jan 2025 21:56:46 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/16986 From: Chris Laplante Previously, the cooker skiplist was shared across multiconfigs (including default ''). If you had a recipe that was incompatible with several multiconfigs for different reasons, then the displayed reason (i.e. the "ERROR: Nothing PROVIDES" and "* was skipped" messages) might vary across invocations of bitbake. This was caused by the random order in which recipes are parsed under different multiconfig contexts, with each skip reason overwriting the previously assigned reason. I hit this specificially when using COMPATIBLE_MACHINE, but COMPATIBLE_HOST (or anything using bb.parse.SkipRecipe) would have done it too. Signed-off-by: Chris Laplante Signed-off-by: Richard Purdie --- lib/bb/command.py | 21 ++++++++++++++++++--- lib/bb/cooker.py | 11 ++++++----- lib/bb/tinfoil.py | 16 ++++++++++++---- lib/bblayers/query.py | 14 +++++++------- 4 files changed, 43 insertions(+), 19 deletions(-) diff --git a/lib/bb/command.py b/lib/bb/command.py index 1fcb9bf14..5e166fe45 100644 --- a/lib/bb/command.py +++ b/lib/bb/command.py @@ -420,15 +420,30 @@ class CommandsSync: return command.cooker.recipecaches[mc].pkg_dp getDefaultPreference.readonly = True + def getSkippedRecipes(self, command, params): + """ + Get the map of skipped recipes for the specified multiconfig/mc name (`params[0]`). + + Invoked by `bb.tinfoil.Tinfoil.get_skipped_recipes` + + :param command: Internally used parameter. + :param params: Parameter array. params[0] is multiconfig/mc name. If not given, then default mc '' is assumed. + :return: Dict whose keys are virtualfns and values are `bb.cooker.SkippedPackage` + """ + try: + mc = params[0] + except IndexError: + mc = '' + # Return list sorted by reverse priority order import bb.cache def sortkey(x): vfn, _ = x - realfn, _, mc = bb.cache.virtualfn2realfn(vfn) - return (-command.cooker.collections[mc].calc_bbfile_priority(realfn)[0], vfn) + realfn, _, item_mc = bb.cache.virtualfn2realfn(vfn) + return -command.cooker.collections[item_mc].calc_bbfile_priority(realfn)[0], vfn - skipdict = OrderedDict(sorted(command.cooker.skiplist.items(), key=sortkey)) + skipdict = OrderedDict(sorted(command.cooker.skiplist_by_mc[mc].items(), key=sortkey)) return list(skipdict.items()) getSkippedRecipes.readonly = True diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 1cb3e189f..6fce19b46 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -134,7 +134,8 @@ class BBCooker: self.baseconfig_valid = False self.parsecache_valid = False self.eventlog = None - self.skiplist = {} + # The skiplists, one per multiconfig + self.skiplist_by_mc = defaultdict(dict) self.featureset = CookerFeatures() if featureSet: for f in featureSet: @@ -612,8 +613,8 @@ class BBCooker: localdata = {} for mc in self.multiconfigs: - taskdata[mc] = bb.taskdata.TaskData(halt, skiplist=self.skiplist, allowincomplete=allowincomplete) - localdata[mc] = data.createCopy(self.databuilder.mcdata[mc]) + taskdata[mc] = bb.taskdata.TaskData(halt, skiplist=self.skiplist_by_mc[mc], allowincomplete=allowincomplete) + localdata[mc] = bb.data.createCopy(self.databuilder.mcdata[mc]) bb.data.expandKeys(localdata[mc]) current = 0 @@ -933,7 +934,7 @@ class BBCooker: for mc in self.multiconfigs: # First get list of recipes, including skipped recipefns = list(self.recipecaches[mc].pkg_fn.keys()) - recipefns.extend(self.skiplist.keys()) + recipefns.extend(self.skiplist_by_mc[mc].keys()) # Work out list of bbappends that have been applied applied_appends = [] @@ -2358,7 +2359,7 @@ class CookerParser(object): for virtualfn, info_array in result: if info_array[0].skipped: self.skipped += 1 - self.cooker.skiplist[virtualfn] = SkippedPackage(info_array[0]) + self.cooker.skiplist_by_mc[mc][virtualfn] = SkippedPackage(info_array[0]) self.bb_caches[mc].add_info(virtualfn, info_array, self.cooker.recipecaches[mc], parsed=parsed, watcher = self.cooker.add_filewatch) return True diff --git a/lib/bb/tinfoil.py b/lib/bb/tinfoil.py index dcd3910cc..4dc4590c3 100644 --- a/lib/bb/tinfoil.py +++ b/lib/bb/tinfoil.py @@ -188,11 +188,19 @@ class TinfoilCookerAdapter: self._cache[name] = attrvalue return attrvalue + class TinfoilSkiplistByMcAdapter: + def __init__(self, tinfoil): + self.tinfoil = tinfoil + + def __getitem__(self, mc): + return self.tinfoil.get_skipped_recipes(mc) + def __init__(self, tinfoil): self.tinfoil = tinfoil self.multiconfigs = [''] + (tinfoil.config_data.getVar('BBMULTICONFIG') or '').split() self.collections = {} self.recipecaches = {} + self.skiplist_by_mc = self.TinfoilSkiplistByMcAdapter(tinfoil) for mc in self.multiconfigs: self.collections[mc] = self.TinfoilCookerCollectionAdapter(tinfoil, mc) self.recipecaches[mc] = self.TinfoilRecipeCacheAdapter(tinfoil, mc) @@ -201,8 +209,6 @@ class TinfoilCookerAdapter: # Grab these only when they are requested since they aren't always used if name in self._cache: return self._cache[name] - elif name == 'skiplist': - attrvalue = self.tinfoil.get_skipped_recipes() elif name == 'bbfile_config_priorities': ret = self.tinfoil.run_command('getLayerPriorities') bbfile_config_priorities = [] @@ -514,12 +520,12 @@ class Tinfoil: """ return defaultdict(list, self.run_command('getOverlayedRecipes', mc)) - def get_skipped_recipes(self): + def get_skipped_recipes(self, mc=''): """ Find recipes which were skipped (i.e. SkipRecipe was raised during parsing). """ - return OrderedDict(self.run_command('getSkippedRecipes')) + return OrderedDict(self.run_command('getSkippedRecipes', mc)) def get_all_providers(self, mc=''): return defaultdict(list, self.run_command('allProviders', mc)) @@ -533,6 +539,7 @@ class Tinfoil: def get_runtime_providers(self, rdep): return self.run_command('getRuntimeProviders', rdep) + # TODO: teach this method about mc def get_recipe_file(self, pn): """ Get the file name for the specified recipe/target. Raises @@ -541,6 +548,7 @@ class Tinfoil: """ best = self.find_best_provider(pn) if not best or (len(best) > 3 and not best[3]): + # TODO: pass down mc skiplist = self.get_skipped_recipes() taskdata = bb.taskdata.TaskData(None, skiplist=skiplist) skipreasons = taskdata.get_reasons(pn) diff --git a/lib/bblayers/query.py b/lib/bblayers/query.py index bfc18a759..eb7cb465b 100644 --- a/lib/bblayers/query.py +++ b/lib/bblayers/query.py @@ -142,10 +142,10 @@ skipped recipes will also be listed, with a " (skipped)" suffix. # Ensure we list skipped recipes # We are largely guessing about PN, PV and the preferred version here, # but we have no choice since skipped recipes are not fully parsed - skiplist = list(self.tinfoil.cooker.skiplist.keys()) - mcspec = 'mc:%s:' % mc + skiplist = list(self.tinfoil.cooker.skiplist_by_mc[mc].keys()) + if mc: - skiplist = [s[len(mcspec):] for s in skiplist if s.startswith(mcspec)] + skiplist = [s.removeprefix(f'mc:{mc}:') for s in skiplist] for fn in skiplist: recipe_parts = os.path.splitext(os.path.basename(fn))[0].split('_') @@ -162,7 +162,7 @@ skipped recipes will also be listed, with a " (skipped)" suffix. def print_item(f, pn, ver, layer, ispref): if not selected_layer or layer == selected_layer: if not bare and f in skiplist: - skipped = ' (skipped: %s)' % self.tinfoil.cooker.skiplist[f].skipreason + skipped = ' (skipped: %s)' % self.tinfoil.cooker.skiplist_by_mc[mc][f].skipreason else: skipped = '' if show_filenames: @@ -301,7 +301,7 @@ Lists recipes with the bbappends that apply to them as subitems. if self.show_appends_for_pn(pn, cooker_data, args.mc): appends = True - if not args.pnspec and self.show_appends_for_skipped(): + if not args.pnspec and self.show_appends_for_skipped(args.mc): appends = True if not appends: @@ -317,9 +317,9 @@ Lists recipes with the bbappends that apply to them as subitems. return self.show_appends_output(filenames, best_filename) - def show_appends_for_skipped(self): + def show_appends_for_skipped(self, mc): filenames = [os.path.basename(f) - for f in self.tinfoil.cooker.skiplist.keys()] + for f in self.tinfoil.cooker.skiplist_by_mc[mc].keys()] return self.show_appends_output(filenames, None, " (skipped)") def show_appends_output(self, filenames, best_filename, name_suffix = ''):