From patchwork Sun Jan 12 14:53:53 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: 55397 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 E3EE2E7719C for ; Sun, 12 Jan 2025 14:55:13 +0000 (UTC) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (NAM12-DM6-obe.outbound.protection.outlook.com [40.107.243.49]) by mx.groups.io with SMTP id smtpd.web10.36962.1736693704545218603 for ; Sun, 12 Jan 2025 06:55:04 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@agilent.com header.s=selector1 header.b=RXYE3Bpt; 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.243.49, mailfrom: chris.laplante@agilent.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uuK/2poquT4OPkkpURYgntyk7b5uDcvMbEJzmmwSirWf8UravIFyI+7gO4BnBYk+INqErBIlqFqD0GtXRqVbBgiNLaPqlY+7BxlUudNyIcxkJdo8u9Ve0Ed1CnT1d3PdBz8rw45lTBH4pCzUeNdwJf+TZnaNoZBHZrYcd66jg7AB9MtlneV6vWrhHgb0qncG+91fG2mFeFPrDgSud+52MwH5Yyq2ZF9d1hXAQRrtGDyT6GDQdKSPynYg0T4Tozn49oHDhlo9PQp8btpbVXyo5Na5xHnQtaqtFZ8YAuiyh7uAYgolYkXF3Ap1RgV/B17K81Jifr7ooBcQ/XsjULOcVQ== 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=ga1UWXiImv+lxoTybktwMqY93o8AeRBHOIlRNLtmv8M=; b=t5mMWGkhywoGEXcqKnQ4JxMUhlMb/hpSJGY17uC/HQeGAztYS9i7rsu5LFn1tetdq0Sj6dTONQ9j32foz61u2BdV760zZbVUJDeXZlxxlRoDeba0bAmu+JwR/Mf8D2sp9pKjvFTIkrpXtSwdyYMnAf0cbDVOW/dZ9l6oBoCbw5Eh7QVjR8grySUIvcPygkh0Ou8O07B0sGwNSEL5Goion/TxkbboySd/EPCw/K2W6N9vsGqzA3xTA1aYNeLxhz4A9d5OScWCJMdv601qPMAlwnrotBYcL+WxYJDOAH6fbLKA/tnQfCMRZ35qrNMqZNs+VxiyM/vq7UNQn5xQq/fEEw== 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=ga1UWXiImv+lxoTybktwMqY93o8AeRBHOIlRNLtmv8M=; b=RXYE3Bptye0huov0OSxjYSADgMBwZqjC3kLfwxud9vNSBQnKNEIDpZ5CYQL75im8TvUFamWy0Mb5t2lhBmitcGtyMsKj2FzudBG/6Xiljh/6hx/UVsnujbk+ixsDj+FHTkfpNYKe2DLswdXJpwUk8fZBjGq5TeGAzFkkDCybVR66RWyKPbGvj6FCFEUTfdKAROdQ5J9fc2cpuiKiN5JD2typ81353ddhfToeX8Wkq+Ci9s29rqTNrbS4tgc5bnkyC/hVF4C2LVOBw4AMKv1hNgI/qLOIvKpotaXrUGevadsVPD7iBhVN7lKsd/42irTT17BTSJzlVopm38RMihGZLg== Received: from BN0PR03CA0039.namprd03.prod.outlook.com (2603:10b6:408:e7::14) by PH7PR12MB6636.namprd12.prod.outlook.com (2603:10b6:510:212::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.17; Sun, 12 Jan 2025 14:54:58 +0000 Received: from BN1PEPF00006002.namprd05.prod.outlook.com (2603:10b6:408:e7:cafe::76) by BN0PR03CA0039.outlook.office365.com (2603:10b6:408:e7::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8335.17 via Frontend Transport; Sun, 12 Jan 2025 14:54:58 +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 BN1PEPF00006002.mail.protection.outlook.com (10.167.243.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.11 via Frontend Transport; Sun, 12 Jan 2025 14:54:58 +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; Sun, 12 Jan 2025 07:54:55 -0700 From: To: CC: Chris Laplante Subject: [PATCH 1/7] devtool: un-globalize the 'basepath' variable Date: Sun, 12 Jan 2025 09:53:53 -0500 Message-ID: <20250112145359.607585-2-chris.laplante@agilent.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250112145359.607585-1-chris.laplante@agilent.com> References: <20250112145359.607585-1-chris.laplante@agilent.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00006002:EE_|PH7PR12MB6636:EE_ X-MS-Office365-Filtering-Correlation-Id: 222bba68-6f26-404a-efaf-08dd33191571 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|1800799024|376014; X-Microsoft-Antispam-Message-Info: V1H4xJ/JK3UTmjdCxOqukEnW6YYA6xYN8NrDna5en4GnPe3s5sC+zlGjtSEfOhob5kvk4rqE/nPsupRIWpYbNMLK0jeKENQB8Jeo7akT4KfH6/fEjWPBPSBtLJ07CTYlQQA1JDyarvDHYDHw2L9WPB5xIp0ZnCVZiKb44jAXGZD5eFaWngbDL3DlMJ1Oxfx90lg60xPo7zaA7wZl0NeRuVbBDRbafTte/vSNFuDG1eQZWd490uztkT2QAdjrswej3QtZXWxY9sPdWPpgzACET+uQuqHxf9XzLGQD2M/p2AMH2Y7CCyXCh3DwsUZ61kigtexeAW8N4I+dnHeZZM7n6TzNx9gY4kleB6TBTO6UOcpsoql1evu1n003fXnZCJ8ZgcalWiiOm6y8tIm0n9/H7a6TUO1vSycKnndJqvZZNSM9sZDfvgTg0swyqbzbiNnv9bj9d4m2ToGAEYZ8ClQ9J6Srv1V0TtADHAeShGdQynkNe71aPvaL411rtJtJThhmotNYtK+1+bZQ8gPaXo/sMgwDVAK8LL1TkdvpKEGnNSZn1huBiPCx9yPxgT3d2beZuuN0Pnu0YjjZtHK4bzdWy9FAZpRwVv0rJkXnsIW9vJF50CLkhaRaYNKYPgQrcmYO8iMK+Cgd66/74u69T1yqPfIJGLdAgwqPg+3leKrGdA7CDsZlqhEEx+FTdRVXess7pr4bTnqCbN1ox34GCcSO91vNduv+TQ2MlStonJKRsHnABYiqD4uiKYLRM0rMns5EloFQC9a9rssUyvU3RELWFQlW7RQ3e1WQb+mHr+Ld5krEgAkUZ8pgZuVkK+k10y12f0VDTGRhN/+gtxRhhuzas5YBTLdd6edAAwr1kR5izvbyVaa34lVoh+7x1xNJLdLbB1+ay1AKbiM8fbdwe0JFYCTA0QCvQfc9vyqG0hXrtLgHNYlHhAb8DuQJuv08r5hJQn/zNWsZGa68ChJuzFC3sIBButipNXrDRk9E2pWJG/84SR6dnFj0S7jvOettYk10Cqltx1JVBYrcJCq2BID8QSVgBzgOkW33zjNTQtxvSwOquL8sNCw643+zJ/4NrBDrKNixvwLHN+9OXU3eVmrdHHV4ajRG03dFUf1xEHWLuV6rE9Sux9XRVswWRvDCWupNXF2J85ZiTARqbyLE8OZKkiWPoacBim9OR2bd4ziKmho5cw1Ugq3HTXcTBIj023Uh3wICI59yst2jsYtDLIdVYL02COVefruKHSSKUACNj7wSwq9aSLROlhSoS3xZNSDy6CO16HsoZ/d2FTYe1rMsmZPuP0DbV8tCDwgqfgGvZpq+5VOQTxigc+vilFWgZLzLyexuvTBSXrgYmy243Xj28+qPMskRZcz0wlx1fq6RgBk2IEsLY93LbfCow2wXI3hKfaERRXfzh9m+oyFkGQkN8SlRIETDebvR+43B6JWIVYd6S5DjPqyvZIRPHs108Qzc107QqU4wUSE6fBj48frkHCodGpLwdPM/ZqPYnFAFh/U= 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)(1800799024)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: agilent.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2025 14:54:58.2215 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 222bba68-6f26-404a-efaf-08dd33191571 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-BN1PEPF00006002.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6636 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 ; Sun, 12 Jan 2025 14:55:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209691 From: Chris Laplante Signed-off-by: Chris Laplante --- scripts/devtool | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/devtool b/scripts/devtool index 60ea3e8298..acc4e0e982 100755 --- a/scripts/devtool +++ b/scripts/devtool @@ -13,10 +13,8 @@ import argparse import glob import re import configparser -import subprocess import logging -basepath = '' workspace = {} config = None context = None @@ -33,13 +31,15 @@ logger = scriptutils.logger_create('devtool') plugins = [] -class ConfigHandler(object): +class ConfigHandler: + basepath = None config_file = '' config_obj = None init_path = '' workspace_path = '' - def __init__(self, filename): + def __init__(self, basepath, filename): + self.basepath = basepath self.config_file = filename self.config_obj = configparser.ConfigParser() @@ -59,14 +59,14 @@ class ConfigHandler(object): if self.config_obj.has_option('General', 'init_path'): pth = self.get('General', 'init_path') - self.init_path = os.path.join(basepath, pth) + self.init_path = os.path.join(self.basepath, pth) if not os.path.exists(self.init_path): logger.error('init_path %s specified in config file cannot be found' % pth) return False else: self.config_obj.add_section('General') - self.workspace_path = self.get('General', 'workspace_path', os.path.join(basepath, 'workspace')) + self.workspace_path = self.get('General', 'workspace_path', os.path.join(self.basepath, 'workspace')) return True @@ -86,7 +86,7 @@ class Context: self.__dict__.update(kwargs) -def read_workspace(): +def read_workspace(basepath): global workspace workspace = {} if not os.path.exists(os.path.join(config.workspace_path, 'conf', 'layer.conf')): @@ -209,7 +209,6 @@ def _enable_workspace_layer(workspacedir, config, basepath): def main(): - global basepath global config global context @@ -264,7 +263,7 @@ def main(): logger.debug('Using basepath %s' % basepath) - config = ConfigHandler(os.path.join(basepath, 'conf', 'devtool.conf')) + config = ConfigHandler(basepath, os.path.join(basepath, 'conf', 'devtool.conf')) if not config.read(): return -1 context.config = config @@ -332,7 +331,7 @@ def main(): try: if not getattr(args, 'no_workspace', False): - read_workspace() + read_workspace(basepath) ret = args.func(args, config, basepath, workspace) except DevtoolError as err: From patchwork Sun Jan 12 14:53:54 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: 55395 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 0BA9CE7719E for ; Sun, 12 Jan 2025 14:55:04 +0000 (UTC) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (NAM04-DM6-obe.outbound.protection.outlook.com [40.107.102.77]) by mx.groups.io with SMTP id smtpd.web11.37269.1736693703195545735 for ; Sun, 12 Jan 2025 06:55:03 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@agilent.com header.s=selector1 header.b=K6AfbwSA; 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.102.77, mailfrom: chris.laplante@agilent.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h4SXMyzsPztXqa5DACd1KAKispp2vk4o2oxUuLsdIjo6fH7v7YlNBxeQHc0FVm6bJXgHPL37iwncaSw0BNOkhfl/YH3fLcEUbuNKG45RAaHFUnNLY/je0UTAxY1//492lApL4FQc5OpHNq4+CIPag5c4JCdO4+LllzlFpRVVjPCssA/JkyMzzbL6gD692u+aXyKVoEdwL0Bji3+y/gtRxb4XnVQ+bjUQ8LX+lcNuhFcGt2I2hWB+q16yjjv9L5zDYMIQvO+fp9gDdskKT6bhh0LubGPJql2OBlM94mG2qRC5rCGoE3A9j4Z+hY5LvexLpovHBMScPXHinWUfSdnj5Q== 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=sJryUdLbY+xrvsKtnjrM7MyYoUPQgBZfY4UiJ7bZKCA=; b=pNOaxWm5P3/gaftYwAZRiwlxVAwHAAAvq2jU8mWGdDTqqTR3ter+A0BEgA46wMYvYAlzOJaIMxOUACOza9fhdMjG6A+16jBal6DdJWCqyHkY7SeqTq5G0Miyxr/Zcifaa8FWkwxQQpqeopgYPLJFuPo8Tq8anMuvCVyZLijGfsKuGl4v3EbQEpGv79mwrjb9Zw+S2VryGWlKj954tWGHaWO6k5bl/iyJ2Tc5S1iq0qJY0MTCG8KJwW8vR5RT0N9nVjKmGedwIoC5fJanMH9JHl69bMT93oIEH1667HvvKe/xUA+RdLwrQx4EcW78nEtK3Yw3JK8GChK4ey4T6f/0gw== 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=sJryUdLbY+xrvsKtnjrM7MyYoUPQgBZfY4UiJ7bZKCA=; b=K6AfbwSAcnM06u28o1h7UY+vbSQP2oeHJMhVIUbxXj1LiQ4P+jTrri81cZhXn9twBZ1yUEDhSXp48lelaEY4szGMCnhXyo80MX/O7lFEMDLf+2aKfyUu7qYurL+Cncsa3zUZ5YsAL+EwTyr+ey2gUxZy/9//arYxcZh2DwEe8F4RpIdRcQuulePTONuCe4hayCfPwYzH16WaAGbrsh2dMTlYigaFJQU+8qlYjTbnPnXj51vZcB0ajNF3KKThOcxV4MFrIGUg57o5gn7XOYD0qbIxnIXEY+IV8ePAAprCatNyY+Aa36kZGhtiHlK2nnid5eTrOenZNCNIF5b4G5mL1Q== Received: from BN0PR04CA0121.namprd04.prod.outlook.com (2603:10b6:408:ed::6) by CY8PR12MB7217.namprd12.prod.outlook.com (2603:10b6:930:5b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.10; Sun, 12 Jan 2025 14:55:00 +0000 Received: from BN1PEPF00006003.namprd05.prod.outlook.com (2603:10b6:408:ed:cafe::9d) by BN0PR04CA0121.outlook.office365.com (2603:10b6:408:ed::6) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8335.18 via Frontend Transport; Sun, 12 Jan 2025 14:55:00 +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 BN1PEPF00006003.mail.protection.outlook.com (10.167.243.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.11 via Frontend Transport; Sun, 12 Jan 2025 14:54:59 +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; Sun, 12 Jan 2025 07:54:55 -0700 From: To: CC: Chris Laplante Subject: [PATCH 2/7] devtool: un-globalize 'workspace' variable Date: Sun, 12 Jan 2025 09:53:54 -0500 Message-ID: <20250112145359.607585-3-chris.laplante@agilent.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250112145359.607585-1-chris.laplante@agilent.com> References: <20250112145359.607585-1-chris.laplante@agilent.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00006003:EE_|CY8PR12MB7217:EE_ X-MS-Office365-Filtering-Correlation-Id: d067b462-6d54-4865-3829-08dd33191662 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: hugGETdSx6J+pO0pWxrOhgOCExbGOHDYQkPB2sCokxJugjvq5ucnFa1Ump1Ds6hCuNvPg4DNdwQ3jldnwwfEFu3DyvFHCX07yospvcby4AWV1N9o6uVPU2ec4eFQY9mpzSTh038kjGJjqqEljcwT5AQ1JmzesaonsALFFafCgiM7smjzMtg69yexjKHrlpYfr0gop5dB6bJh7QhrQ287fKfL4HcS8CnYWnHtHtsp10XZ5AqFwTK7FzfW4DOk1o/IQagn+o29raAngDH7GjiZ5ld/ytdrKUWBjxKGPbCGBR3vE/+0aslY5hAoA7z+QnXjEcAjQWin/B7E+Jek6/nuZIBbfwHHqbOEhX3pO9h22d60gHP4YdhXDM3WXJVz2e2TBkO2LHgfdzaueZScAT3gH3zfwRDb4wtSp4aay7OUSDP4ImKKDj7txVFL23ejbm9kN7bzO/FSW5nbXMzcOaa0cMQMk4Dtr7voF1SJ0sKAR9HT2STi34zvdkkoNj916V5Rld+n4WTvORMBKpvBSXfojO0Ak2EndV3SvX3sMqmKeK12LLcx2iFeXNI+JukNRpAjbWeZANBvpWHM+iY7N84QjM531NNOBNqv2zs2Z44qBxXSuRcmfCiGqCLbhQc1WPE9uYeJBIHqx0hQbI/QwyW1XTuL7U1mxg3TF9T4tEz7ni5KPuegKI3BWgAxp9p2ju4L1E/tLvttpxSv46PxPvX/j+SFFwYeCwVfKaUIddBpWMWqQnHVhVmelLu93nT5GVrlbMZp8bq53JFlIs9jFK/E7RNXK1Vm7HMPoQD1h8vxOfw72M5klecwMkGX03rWw/1YAmaN7TMzVgS4U4g22JCLCWwqHN53M/8ABJtqntw+PSKH/GI6R6W3VnHWWT/j9/52fhsafynn9IM25+x0jHmOtRVWzdIJQd8A7EWm9G9wIHDZFzNplZkoqcQI3kZZnHCvaWeraXDtDTb2Edjnuc772Rn/p0cZM4C8ZzdvTOeXhcCPJl/D39M27GWOQj+dULYQhc6EHAtlpTgOMD5/4XJ8dQeIMrr/snkqlfC2geYL00xVFRIUPyxW1fU84wgN4NBRwSJ1jpeq6uN5eU96YWbt6u+yfzkrwe+THkBpg2Ibzm/vYhnebf6wxLVd9IHIqT7Sni0c7RuHNQkxFLsW4NLIE2M6fuOQjigUl1jUk60/QStJXsy4LjZdsZEmGK/5kAoPkf4ic/BS9U2gE41UZBa2yoxUH+f1BMDR20fabRG4Y26oVLcqwgmlMocwWBMd8WqbABAzxFHIvAy4IoJoqFcZQTgVxeP5tQ0ifqi5jmFFOUEI7kDcWW6n//QIPbF2lAGv7YjtmGd7I6cSrJi284Lmvg85HUA8QYOpO25Pt1cdHwdLcEuXxwTJx731ZA4x2iDjzGgTnhRG249UhIfIKAzRs3mKhG8gtqM9gKRnd8xl96Dy6m+WDkVsPLseQhhPoXUTUW0uZhWn7xQc584F4KbJjCOV4kkBcCALscOQOYzPOcs= 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)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: agilent.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2025 14:54:59.7963 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d067b462-6d54-4865-3829-08dd33191662 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-BN1PEPF00006003.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7217 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 ; Sun, 12 Jan 2025 14:55:04 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209690 From: Chris Laplante Signed-off-by: Chris Laplante --- scripts/devtool | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/devtool b/scripts/devtool index acc4e0e982..d7a5903c9f 100755 --- a/scripts/devtool +++ b/scripts/devtool @@ -15,7 +15,6 @@ import re import configparser import logging -workspace = {} config = None context = None @@ -87,7 +86,6 @@ class Context: def read_workspace(basepath): - global workspace workspace = {} if not os.path.exists(os.path.join(config.workspace_path, 'conf', 'layer.conf')): if context.fixed_setup: @@ -132,6 +130,8 @@ def read_workspace(basepath): logger.debug('Found recipe %s' % pnvalues) workspace[pn] = pnvalues + return workspace + def create_workspace(args, config, basepath, workspace): if args.layerpath: workspacedir = os.path.abspath(args.layerpath) @@ -330,9 +330,9 @@ def main(): args = parser.parse_args(unparsed_args, namespace=global_args) try: + workspace = {} if not getattr(args, 'no_workspace', False): - read_workspace(basepath) - + workspace = read_workspace(basepath) ret = args.func(args, config, basepath, workspace) except DevtoolError as err: if str(err): From patchwork Sun Jan 12 14:53:55 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: 55396 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 E2EBCE77188 for ; Sun, 12 Jan 2025 14:55:13 +0000 (UTC) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (NAM02-DM3-obe.outbound.protection.outlook.com [40.107.95.78]) by mx.groups.io with SMTP id smtpd.web10.36967.1736693707523365522 for ; Sun, 12 Jan 2025 06:55:07 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@agilent.com header.s=selector1 header.b=gCwnPpHF; 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.95.78, mailfrom: chris.laplante@agilent.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xYFe0qZHU1nkxPpGcwHfshm+TLmcNrG58ZKhY8O6/WaLoRwT/GKMep/J4LLjRe+yZT2qEl5zR0O50TMjVfziRtZC73z1uP0SrLzTb4niz22tsFRFX/S0wyQBVTSWnzIgVBS4lnOw6ThZp7CGFLtcxfDbCtSpmC3PHsNy6vU2bkEqsBJnNVAh/+lHPByF0CgFNz25c1zfI2P5m228qAvBXCpiZ+pUFsUwk+fbWU6xioMugMJdm/gay4EDRTb/VNbV2zpDWegKWu0xb2o4Q9xagOn3jW2iOxUyBileCJUc6UuT/fTfvJFi9xDjn6nVt3Z79G2O7MtE7lamo7dAHV1taQ== 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=Lsk4kgJ1ksZ+Y74iHHMzcH1UtdjDzfj98m/xjSw6muY=; b=W6CMv5wuVuKWmbF3MqNefOyaI3UoennvMRKHuNmoP/CGV4yh/gnSRAzsmP7v0E50e42A7oH7fMC669gLDeioYYlpwMj+p/WSiPcwRG1OBZ5nEjmkvVfhST/P6hZEXhYYQNjqwnorcVNJZj4NNqk9wkLZb/tDZViDtMiSL12J0HIjBnOyamgqwxeatp3XdtDs2KxAoLM5EcxT2b62IzBByEQFXEK2u5vs6S1TjikMypq/eLdblhas/OeIgoTHw28zArwWtheSI713q9vvzt60p/8eP55Ciyc8GyKwgLFGO4TBTgR+OTC9Z546ocGic0pLnA75QplPRg3ivX8e6PWqIQ== 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=Lsk4kgJ1ksZ+Y74iHHMzcH1UtdjDzfj98m/xjSw6muY=; b=gCwnPpHFQdhgyNne5ZvybKUObm6WxGPGJDhyuUkjBiELiZP+7Ic/mv7ddXLQrOygsFX54E2FwcKjrYCy2LfzHxODey1Q4V5RdotvxJZRzcxgNPAmmCrHwOLlb4KRpKXVZQcibPd2wPMcghOzpIaN6Xz7RgvB075z283QVwiU6jdo/c29PJbBAxMufrbgm6gDwjIr/FdzKw+d70eH/J39xba1hhsuNedKa5HNrD/AnAPEAWr5PfbDrxrYbKXHHWSkoHYnYIl3cTSQcf7ZCkX5KuqGjViEvMklvLS8jOcM5VGt69M27MhdAJ68d2qmFcJ96HqpDbmOQFIz5rj44fASmQ== Received: from BN0PR04CA0135.namprd04.prod.outlook.com (2603:10b6:408:ed::20) by DS7PR12MB6045.namprd12.prod.outlook.com (2603:10b6:8:86::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.17; Sun, 12 Jan 2025 14:55:01 +0000 Received: from BN1PEPF00006003.namprd05.prod.outlook.com (2603:10b6:408:ed:cafe::97) by BN0PR04CA0135.outlook.office365.com (2603:10b6:408:ed::20) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8335.17 via Frontend Transport; Sun, 12 Jan 2025 14:55:01 +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 BN1PEPF00006003.mail.protection.outlook.com (10.167.243.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.11 via Frontend Transport; Sun, 12 Jan 2025 14:55:00 +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; Sun, 12 Jan 2025 07:54:56 -0700 From: To: CC: Chris Laplante Subject: [PATCH 3/7] devtool: un-globalize 'context' variable and convert it to a dataclass Date: Sun, 12 Jan 2025 09:53:55 -0500 Message-ID: <20250112145359.607585-4-chris.laplante@agilent.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250112145359.607585-1-chris.laplante@agilent.com> References: <20250112145359.607585-1-chris.laplante@agilent.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00006003:EE_|DS7PR12MB6045:EE_ X-MS-Office365-Filtering-Correlation-Id: 4684c7cf-5b6e-42f8-a5e0-08dd33191712 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|376014; X-Microsoft-Antispam-Message-Info: n4VgL+CxLELems3t4qGIZAUu+Pf1+XvYHjqI/X2d25HeQDelGn+07bVYp4aPQRkVhUp7qUEp+jn7WN1R/N006qcgkA17qMn4cmXdSIbnafARJilpWDw6RAIPTfIEcngM4ZQwUrEn9Sztyl+B6NlBx7REtowiXqwnY7NDiTFM4V/VkzE1pHY57MqMi9vZ0oZ2lcYIGUw5AwEgPKL0Dvz3h8bf+IuIEg29e6FLUzVU8tTR0VMK9nWkNuHFlYZZpQLP++yaD466ATUaKa6nx47GNmibmCoxa6j3OjY32jjRk3hgTCI+GvJX1rXanv6i74VGmzL8g6NP6qkjMjyLbVqCRiO5WEuej8BTDmKfp/xpma7k81e8vB+6X3EMjJ2aEXXVdP82rOIHJ8VpDxRFbFSDGhuEoAPR4+tgZePiIeQknXEpGwW5/N3H1NEjEh9tYAjBm9Ek4/0gZQh2KzhY6vtUnKcQpqq3pmZBqzfBsQ+vXSaqbJxnN8LRWma5Z241sfZGA/rIsmt0vCAOjgfNBKZazSHEWd4fCQEbu20K3O4SxOobVfXrngEEPoGtEsMfbtKmQobEiX8uKg9srP1wA1qMEhEci7oUlZr/HDDjOslsD0+BwJUBTRkSiRq1k617yZMLOErA+DZusKYTpnZpMYdKUJ6qQDpr4SWT7Ezr9A4SaITBcB6zcdd74p+K1Zzvx9dfA14qWLn0AkvprnP8uXdSvC8QSRq7I9EPbN09810fkTz2fMQslUH8oYZXH9hakcZtdBAMf6BE4Tn3lXWPVwgRmJ7UARq4aToOxTZnLr52Vb1N9zPXu1AgfLJODcfTKxsCL9OzC2Nl/yTRdhumeMTsncq6KOr/L2MjG05h1xtZMVOj9BGTiAwN55ZZMq2ObxJofIcQOYcHn8XBK4DTljAEI0IQlr6EcvzhCPueLuuWQ1F+WHWOA4TV2crT7tVatuABAuURNxsdEqPG0C2dviZuS2mXVA35/rcXUn2+chMfI1U70lkqQdztpczL2r65kk8FXHrx1ULX8LE264ODaDk93cd73ORQ0oVbUTJ4fJ4LA6opJNaUUCOhTyca92ZgyHZlhUDxGHARJaiCrY4g26JkMAhZ90tHrRDxO78X0eDV1LGc8CYBHrOEcyAq60+gnLsvRnBT0vogyxnxqiBTxICk4MRmQBhY+tTzrk92GgRqSn5rd1QZ3GhISp/33ebqe3fcENaRgWgalSB0cjLL/yBZ0g89loiUDRH5g1nfIm1QZ9GpaMlO282aHK31W7enIJYP8Iy/yj/4YFj3yu2zVzThVHu6MarjTS+eR0oS1oz6oTCDBvK5ex8P2DrpyKq3H7480ZTeLrU24YTyhy4FL4S7av6AupLDqGD/ND8FrKTwTgjETpLqDvWJgluGJCyGZ4YnWjfFCBQ69E+Q0I8yqQeeiQr+Qz5lY+44Ak14P4xaFFY= 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)(36860700013)(82310400026)(1800799024)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: agilent.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2025 14:55:00.9525 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4684c7cf-5b6e-42f8-a5e0-08dd33191712 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-BN1PEPF00006003.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6045 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 ; Sun, 12 Jan 2025 14:55:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209694 From: Chris Laplante Please excuse the usage of 'typing' slipping in here - it's just how dataclasses work :/. Signed-off-by: Chris Laplante --- scripts/devtool | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/scripts/devtool b/scripts/devtool index d7a5903c9f..1ace6fb035 100755 --- a/scripts/devtool +++ b/scripts/devtool @@ -7,6 +7,7 @@ # SPDX-License-Identifier: GPL-2.0-only # +import dataclasses import sys import os import argparse @@ -15,8 +16,10 @@ import re import configparser import logging +# This can be removed once our minimum is Python 3.9: https://docs.python.org/3/whatsnew/3.9.html#type-hinting-generics-in-standard-collections +from typing import List + config = None -context = None scripts_path = os.path.dirname(os.path.realpath(__file__)) @@ -80,12 +83,15 @@ class ConfigHandler: self.config_obj.add_section(section) self.config_obj.set(section, option, value) + +@dataclasses.dataclass class Context: - def __init__(self, **kwargs): - self.__dict__.update(kwargs) + fixed_setup: bool + config: ConfigHandler + pluginpaths: List[str] -def read_workspace(basepath): +def read_workspace(basepath, context): workspace = {} if not os.path.exists(os.path.join(config.workspace_path, 'conf', 'layer.conf')): if context.fixed_setup: @@ -210,13 +216,10 @@ def _enable_workspace_layer(workspacedir, config, basepath): def main(): global config - global context if sys.getfilesystemencoding() != "utf-8": sys.exit("Please use a locale setting which supports utf-8.\nPython can't change the filesystem locale after loading so we need a utf-8 when python starts or things won't work.") - context = Context(fixed_setup=False) - # Default basepath basepath = os.path.dirname(os.path.abspath(__file__)) @@ -241,21 +244,23 @@ def main(): elif global_args.quiet: logger.setLevel(logging.ERROR) + is_fixed_setup = False + if global_args.basepath: # Override basepath = global_args.basepath if os.path.exists(os.path.join(basepath, '.devtoolbase')): - context.fixed_setup = True + is_fixed_setup = True else: pth = basepath while pth != '' and pth != os.sep: if os.path.exists(os.path.join(pth, '.devtoolbase')): - context.fixed_setup = True + is_fixed_setup = True basepath = pth break pth = os.path.dirname(pth) - if not context.fixed_setup: + if not is_fixed_setup: basepath = os.environ.get('BUILDDIR') if not basepath: logger.error("This script can only be run after initialising the build environment (e.g. by using oe-init-build-env)") @@ -266,7 +271,6 @@ def main(): config = ConfigHandler(basepath, os.path.join(basepath, 'conf', 'devtool.conf')) if not config.read(): return -1 - context.config = config bitbake_subdir = config.get('General', 'bitbake_subdir', '') if bitbake_subdir: @@ -299,7 +303,9 @@ def main(): # Search BBPATH first to allow layers to override plugins in scripts_path pluginpaths = [os.path.join(path, 'lib', 'devtool') for path in global_args.bbpath.split(':') + [scripts_path]] - context.pluginpaths = pluginpaths + + context = Context(fixed_setup=False, config=config, pluginpaths=pluginpaths) + for pluginpath in pluginpaths: scriptutils.load_plugins(logger, plugins, pluginpath) @@ -332,7 +338,7 @@ def main(): try: workspace = {} if not getattr(args, 'no_workspace', False): - workspace = read_workspace(basepath) + workspace = read_workspace(basepath, context) ret = args.func(args, config, basepath, workspace) except DevtoolError as err: if str(err): From patchwork Sun Jan 12 14:53:56 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: 55401 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 EF9D5C02183 for ; Sun, 12 Jan 2025 14:55:13 +0000 (UTC) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.44]) by mx.groups.io with SMTP id smtpd.web10.36963.1736693706343706106 for ; Sun, 12 Jan 2025 06:55:06 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@agilent.com header.s=selector1 header.b=cbPqgyCq; 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.93.44, mailfrom: chris.laplante@agilent.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=I8nCRwPilp2F51rjSFj6f8sVHjAQWKzLg2r46074bI+Xp/uUGoMJ6QaVXrKygCnrvW2yAsBIzxCQIUc3EF0j+S54R6swQ3EEZGHbOo04xhOFhvxa6cOHiTNq1odS+Y/YjhfD2Z9Km+U0qZE9JXEKa991m+8hFjabi+zW8gLLBAIslgxrPb8IbKZS3IfImP1nkxetJ/ytxc/ejgMLRk3WMkWiAGAAUKUmZHer0NWjBRavknqLImpaZXT5njsHaSilWc6clA05k0VoNuO+kjTfLEqcnu1Noitntkw8K7qXqzWJYFecTO28tgHh1IB7aP0Tf7yoWyEknL5xp3OM8H28ig== 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=zdHrwChRhEHbmPvSN8p8N+FwxH2IZa52MnK1MMvgHpk=; b=A5JfAmnoODXMDCzuqFekg0YchFWkUAwVW3sx2u/tKrTrIFQZf77F8boSr6AbxKWTz6b6OlNw3bkpG8xTmgskOEu6/jIHjNbsCv8qsygBsgk+Rmv1TVocgCuD13V3byqjmbR2OBmg/gxnhTsbjVNod1+RC3Kqr2SUE70jFxkjzaW6v7C55/yOdfrDGLqQOfwsMkdaYURYf4fkZ5rmnG+Q8roUz9XCcW3A4lP07dj3wFhO2zWuv4oN+R6bWGqhyZshKGuB/wJZgDHnRMSNxsfSkVLnw8HS1e2FjQSK7iSZsk4I/bIKqzOAiANnWPd9Bhn2h6WXgFHKfAw/85ZEo9UvVw== 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=zdHrwChRhEHbmPvSN8p8N+FwxH2IZa52MnK1MMvgHpk=; b=cbPqgyCqJneuDJrZCQGeuJGMvOhZaA54G/HhuvG20YVkJMmZP2c77X8MTZ0lb3DDMygPRFLYgWCXB7VJajnRrC10y8hl0QNsVY6pvn8JSkSsTl9DPZ9/OJYk7CgnAivypljOrLFJVLuddZ6y0mxJpmmMyL+BmyxUGdj7JIA90f1D2bNVILdhIIO8lwYuyijiCG3mu8HoXPCOMM051yWDRFrPUBdrBH8DiSeqQ1iG44XMIYqXI24bkql9dF5ufpFLRTMScXIiho9QpTkhjA8LmooT4+vPhdgORAgfUI7O0EP1+LJUc5c3j0EY85wj17kGKDEP1lMhD1Cyzvl/miEv0Q== Received: from BN9PR03CA0391.namprd03.prod.outlook.com (2603:10b6:408:111::6) by LV3PR12MB9214.namprd12.prod.outlook.com (2603:10b6:408:1a4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.18; Sun, 12 Jan 2025 14:55:02 +0000 Received: from BN1PEPF00005FFC.namprd05.prod.outlook.com (2603:10b6:408:111:cafe::6) by BN9PR03CA0391.outlook.office365.com (2603:10b6:408:111::6) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8335.17 via Frontend Transport; Sun, 12 Jan 2025 14:55:02 +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 BN1PEPF00005FFC.mail.protection.outlook.com (10.167.243.228) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.11 via Frontend Transport; Sun, 12 Jan 2025 14:55:02 +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; Sun, 12 Jan 2025 07:54:56 -0700 From: To: CC: Chris Laplante Subject: [PATCH 4/7] devtool: un-globalize 'config' variable Date: Sun, 12 Jan 2025 09:53:56 -0500 Message-ID: <20250112145359.607585-5-chris.laplante@agilent.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250112145359.607585-1-chris.laplante@agilent.com> References: <20250112145359.607585-1-chris.laplante@agilent.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00005FFC:EE_|LV3PR12MB9214:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ba6e9c6-ac48-4f30-97b1-08dd331917ba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: rhMEV6o5wKlhZXb8AqJH8kVkoT8mjnmW7fB6lIf+VfsPzZwpD8H+uwjuD7YArbZD+972GsMHVOhcCstOtmn5x2VVIklfkASg4Mr307VBTEONX0CYSGNBxfB96PiGAteKEdyoXaO4M8JJc9HsWo2qk9AvqU+qGxC1yuESgJW14/WEm3r1xw4ACrNPNGOSMGx1dxRL16zHiVPwiAPGyWnijtS5WLVuDnZIj7rE9CybyW822hMu3djFREieAvBac4SV+xrkwRCQgzqWlaWG4kaIAW6ayrxFFiA1Xfzgv/8uKMorZbFLsVnwmKrbDXI+sQMtaEW0Zz0g/NRU7PEhtfUb5eBjQHQ/ncPrCQLchj7s5Us6cZ5oYd9Kki7jnOYHAOpbtFCdTTBP/hqtHhs7+NW/8VnYTVfoYbI/fst+cTwG2K4GHCpb3F4L3Cg9rHQ50TVz2zc7cDTvSBfiJ8qJfMbOnXuOqfuSOx56JXjatJJYL5Vm/VahoMSCddT07QG+QXSKi4/1PYCC53xBHcHtqXi8WjnLVkZ45/F8yj1ZqhurqE+TJ9SR/JeN1gRo04E1ucCiYSDtqFKMesVQFv0ooD1HLc7erCyAp2LeOA+pmuKbyt4pnjJJs+Ghk7857L7DKt/kmjMAj3VwT2ql05bBSlYMXWL/EJ694UNQbT1FBiVT9DRbLQl3tV5Z7QFnGKALWaBV0Srq2NSC1qt51gQExyRZB4RUfZjnM4QsK5JAv+j7kRS5H3mLjEDXygJ66nprChsBlTEGEggubyQCNNBP0jgwYqdQQQ+CYyWgdFiCnpKSNfeDMAe7+SPZg+NZhKgB0KM48h0Z1fghDwqcRO3gZCjgP55m/asdOBT3JPlZWKFU8JRMBldONmSBXUaly6g0kEpsL3SMiyUCQlakEBUrwyD7t+FYfOdwy9fjZAlG3lSHhR0Kaej9fwRw+BuRbVT1rwmDTrmhI/00VZKL4k+LJkuYgnxoqWY8pybmf2z9jK869zRsvZSFkDqBbb3X57Tl00HevdNkXxUIRPplzCZ9pYeZgY/3TzS0WBqw2p2m6rv9t9ZxoWLQdDvr0B31RJznJsmdmgyltwF8EVkQ3c4TVglf7tiTPRDl05DnmwjoSFEVCoOmtxOtMrMlTVJ+QcZcho50skNLWVnWYLdRCeVHdKqs/MMVpSMaKB1OU5dVcFT/99mSQlvtu6glZdKFo/FmQUrA5GGuyDb9zuWTJ5X6FnE/o6gWLpSsfRPYjYlzQXAhEUA1a81w8gfxYY1J/NBb7JOVzHf1udxGd9E/U4ub3ovPyGOIApcoJc7hLAJ42S4elVD0mzmhu1TAHrg8VR6eeA7g+SL//3umJFNRcuE4sS1tb4oWrDdIkGoDwGj3oNzbjmXkPMpEIIz7UVcNilKTk79In9k0yXmvkZ2qpyepLRv8YViWrRhVrcBD+aVT+Y7/oQA= 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)(36860700013)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: agilent.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2025 14:55:02.0531 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3ba6e9c6-ac48-4f30-97b1-08dd331917ba 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-BN1PEPF00005FFC.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR12MB9214 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 ; Sun, 12 Jan 2025 14:55:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209692 From: Chris Laplante 'read_workspace' can now access it via the 'context' that's passed in Signed-off-by: Chris Laplante --- scripts/devtool | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/scripts/devtool b/scripts/devtool index 1ace6fb035..d96d25a51a 100755 --- a/scripts/devtool +++ b/scripts/devtool @@ -19,8 +19,6 @@ import logging # This can be removed once our minimum is Python 3.9: https://docs.python.org/3/whatsnew/3.9.html#type-hinting-generics-in-standard-collections from typing import List -config = None - scripts_path = os.path.dirname(os.path.realpath(__file__)) lib_path = scripts_path + '/lib' @@ -93,19 +91,19 @@ class Context: def read_workspace(basepath, context): workspace = {} - if not os.path.exists(os.path.join(config.workspace_path, 'conf', 'layer.conf')): + if not os.path.exists(os.path.join(context.config.workspace_path, 'conf', 'layer.conf')): if context.fixed_setup: logger.error("workspace layer not set up") sys.exit(1) else: - logger.info('Creating workspace layer in %s' % config.workspace_path) - _create_workspace(config.workspace_path, config, basepath) + logger.info('Creating workspace layer in %s' % context.config.workspace_path) + _create_workspace(context.config.workspace_path, context.config, basepath) if not context.fixed_setup: - _enable_workspace_layer(config.workspace_path, config, basepath) + _enable_workspace_layer(context.config.workspace_path, context.config, basepath) - logger.debug('Reading workspace in %s' % config.workspace_path) + logger.debug('Reading workspace in %s' % context.config.workspace_path) externalsrc_re = re.compile(r'^EXTERNALSRC(:pn-([^ =]+))? *= *"([^"]*)"$') - for fn in glob.glob(os.path.join(config.workspace_path, 'appends', '*.bbappend')): + for fn in glob.glob(os.path.join(context.config.workspace_path, 'appends', '*.bbappend')): with open(fn, 'r') as f: pnvalues = {} pn = None @@ -116,7 +114,7 @@ def read_workspace(basepath, context): pn = res.group(2) or recipepn # Find the recipe file within the workspace, if any bbfile = os.path.basename(fn).replace('.bbappend', '.bb').replace('%', '*') - recipefile = glob.glob(os.path.join(config.workspace_path, + recipefile = glob.glob(os.path.join(context.config.workspace_path, 'recipes', recipepn, bbfile)) @@ -130,7 +128,7 @@ def read_workspace(basepath, context): if pnvalues: if not pn: raise DevtoolError("Found *.bbappend in %s, but could not determine EXTERNALSRC:pn-*. " - "Maybe still using old syntax?" % config.workspace_path) + "Maybe still using old syntax?" % context.config.workspace_path) if not pnvalues.get('srctreebase', None): pnvalues['srctreebase'] = pnvalues['srctree'] logger.debug('Found recipe %s' % pnvalues) @@ -215,8 +213,6 @@ def _enable_workspace_layer(workspacedir, config, basepath): def main(): - global config - if sys.getfilesystemencoding() != "utf-8": sys.exit("Please use a locale setting which supports utf-8.\nPython can't change the filesystem locale after loading so we need a utf-8 when python starts or things won't work.") From patchwork Sun Jan 12 14:53:57 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: 55399 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 EA20CE7719F for ; Sun, 12 Jan 2025 14:55:13 +0000 (UTC) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.72]) by mx.groups.io with SMTP id smtpd.web11.37272.1736693707697541873 for ; Sun, 12 Jan 2025 06:55:07 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@agilent.com header.s=selector1 header.b=nGj0TAWh; 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.244.72, mailfrom: chris.laplante@agilent.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bgEHwxr/pRFWeR95C14SxIBMpat6TJ43ZKp2INWpSfBT5PGxhBUtSdEFQLDzzKXq0dVeuIizWJoVgYR3A1tC2+lu25hSa0LPpIbKpnSplcuxbeuS/uP9kK6fOGImI0GLv2JaclLGOyz5VudoaBCS2og8qdatibgzgC4/belNJMMYtV2ya6wxKopEgikyLZuulpIpx/b08Vmmg+sVmQu0/Jeo5erP+gQpYeen0adeIWBOtN7tcnxd4Ov8Ccv/y6Vmefgrw5w9TZGqZf2Zr4SUE6FKPsHRBD8pX7vpiSzvg4DWKQScNN8EQkqqT089NbjCzpEhvF+OXjj2xHo1UduY8A== 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=dOqeguJGOBq/m6/XAmAe+WALtOltgg8RvRM9W9sQM2w=; b=Ux8HMMT7b4LBbVfa6ytE2GcbYIPm8W+qbKcpTiuc/fSzA7inD7GcXULi16xQFc1jfSzkFyPUDQTpiMhCSGiLNkHdyPQfaLm4P3KWnoJ95fEfCGSGI2JFo5IvgvUEFNQrEE9mXE3lLivxwW4QLTjH+jLiRrdkfHqD8zDzEumH9/iaCGYaFrzg6GYGrayFsOyWmHal4lTMb6gAnMnZkZvVsGoDY9ltd4uwlIG0UOIKCWHuWO1MszXBauxsj72XlUqxuputSzUR+CH10I6pyrYgBWs3evs6RQt0apX9Wys3QhqSOYfUIu+qWegGALE2qLYw9lnS+39Y9eMpUF0mqob0hA== 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=dOqeguJGOBq/m6/XAmAe+WALtOltgg8RvRM9W9sQM2w=; b=nGj0TAWhV4Po/G5ly831+1Ugg4muc5w/5LN+Ijj1pXuODhG/HMnS8UiJVJbT2IL3jwpKjMbbSRcgfLnjwz1PI2B7z4xonwLWMHWwH1eHtP5nkMJYsJBecQ0xmTonBpGRPbyaXQPriSRsYtdcK2S//959URc30dsGtgURdDN620Q4ymWwoMgNl+D0YG+hHCtNZghRZlVhi3u6ldL6JJ881/HHIkZlCsEBws6mqic4K+To1QkcYEtjYSdgCcMyMl/WvewCt1dAghRbuIloGntbPDvxMEZSTvv7tf4DdUrghRKz3EpI0GW4jZmjoccY+4ZM74SXqjURl4gn+dDqrhFYLA== Received: from BL1PR13CA0155.namprd13.prod.outlook.com (2603:10b6:208:2bd::10) by MW4PR12MB7215.namprd12.prod.outlook.com (2603:10b6:303:228::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.12; Sun, 12 Jan 2025 14:55:03 +0000 Received: from BN1PEPF00005FFE.namprd05.prod.outlook.com (2603:10b6:208:2bd:cafe::71) by BL1PR13CA0155.outlook.office365.com (2603:10b6:208:2bd::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.9 via Frontend Transport; Sun, 12 Jan 2025 14:55:03 +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 BN1PEPF00005FFE.mail.protection.outlook.com (10.167.243.230) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.11 via Frontend Transport; Sun, 12 Jan 2025 14:55:02 +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; Sun, 12 Jan 2025 07:54:57 -0700 From: To: CC: Chris Laplante Subject: [PATCH 5/7] devtool: un-globalize 'plugins' variable Date: Sun, 12 Jan 2025 09:53:57 -0500 Message-ID: <20250112145359.607585-6-chris.laplante@agilent.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250112145359.607585-1-chris.laplante@agilent.com> References: <20250112145359.607585-1-chris.laplante@agilent.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00005FFE:EE_|MW4PR12MB7215:EE_ X-MS-Office365-Filtering-Correlation-Id: 52aa381b-0448-43ce-f97a-08dd33191833 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: +43wA8hsCyp1A1CL/7cg+4bLrq6/zIsbkm3Z2GC4GF95WHkqsjoSF5z8uv3Pw5zGSWO8lzmFWoLa16ZdGBTqKywOoQ7qKxJ9vNoXIymO2YElOkCPKHT4gPXRKRV0BP5WCNYKbDGMTAzI40wLomb6yyIJoJoROXiC8hry973rweIDx6JKnYG/dI0mEpKFS4LoWWqzMdxqPo8pgIt0+GKJYV9Co376sDjRjJb86yiz0F1CjNXoJgbFONZKPOnrHpW0i5IDDyAwfJj1ZxaNntdF32dZaWRG3VzrZVnWKx49IoYpI/N3q6AoJD5ja6OytGW6V9qYWxcucinWGBKgvSAJ8l4NziCRrNhhNcW0ARLQfkbDb3pSF+bchFy9saMc2JeFeDCsaGU9Ak5uQCrH/ngfuzjtznCu40VJsF0L4xYSq/XrmIaXy+hMfEl4WnQIAOHoMZhX5re/SmRBhGZ4j8FOKyUuCJANqFkmR4r3F9aOeYAPmltNRsSmKnR1GEGAMo0Bm4y6yGc0P+ygVUNPKPqZMC0MVPLdOHyql3UpWBiQFEu28JJ2/iidFc1N+bhCKntIXUTCAtS5qVa+uqWZgreSLwdq5hUmqLfN35Y/yU3AgIVXJXF5jYIq4ujW5t0lp9PaRjcZiOMpNHmATcm33vA80xQS2e5J01RYhMuHJo7SrffDensUFmiSlTF5NnCcMC68uQwLTG5v6sxE+kAYalecvWN4YqMj0Vj0g5TmY1AwW2NKaW/1QeT8+Szjwsa/w9Fzj1E5iOW3zmpSQ72c2ZFyww12KmEDqoxDjsgyS7hD+8MwDHv8hJKu6GZFlkhz0iEvUdfn6bZ4rMIR5vMopD2mI4ytTtbiSuh7YDG5VsaQBKt4Ku3ZFseiIPrVVVyLN0h+xDy5W6/oUyDizlVJBlHyNM/oPHtZr3K4m0pCSslFBqyctyFlUktq8Qy78Jey8ZKUVoH1r9ICb/0n0Jt76k0sVrLpVbNY9QHUzYO248+0Lm9gkBE9wrM5VI15CZPN/u3HkhilDXgvU4YV0AWgr6WLZ0XZALymtFCYuXZmYFFUQc8FN6metBex++L0kyVlixWqzjvDdnxgzO0QchKSeuQ7lr0nXQVA8EWpXaRMmorNsChB+7EsVHGfCQaivbioXi0IegMg9CevkFEpufCjJa9/wRYliA99671pqF5XjITipRVMfEZt9R3kySLK1OOFLBKXDd9AbYoV8wSrONCWgn3NFZcSAf1O52DiVb3qqJq2RbS1Pka2NIJ+7hod6jDP/bAQCvEj6fMv9ARsTuzKoEeeX58d4R1UIVVgrbCpEx/3wR6FYMg/eDnztDEejKC5As/jOaZhvGBdCPSPkRj07rbZdwQowGjhiyYk63MPrYylqvgLQLLUQg2XyYbAWBH80K8VKcR8KfOodCnySA7ICEX2cbp38eENCdQ5y0kdXIr39XjXrs4zDnTNOykPkLbsqk7/nAumFZvR/sahUTBgB7iuLG3UPrIu1h8PO60yRISHaMU= 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)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: agilent.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2025 14:55:02.8330 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 52aa381b-0448-43ce-f97a-08dd33191833 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-BN1PEPF00005FFE.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7215 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 ; Sun, 12 Jan 2025 14:55:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209695 From: Chris Laplante It never had to be a global anyway Signed-off-by: Chris Laplante --- scripts/devtool | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/devtool b/scripts/devtool index d96d25a51a..b43a958497 100755 --- a/scripts/devtool +++ b/scripts/devtool @@ -28,8 +28,6 @@ import scriptutils import argparse_oe logger = scriptutils.logger_create('devtool') -plugins = [] - class ConfigHandler: basepath = None @@ -302,6 +300,7 @@ def main(): context = Context(fixed_setup=False, config=config, pluginpaths=pluginpaths) + plugins = [] for pluginpath in pluginpaths: scriptutils.load_plugins(logger, plugins, pluginpath) From patchwork Sun Jan 12 14:53:58 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: 55400 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 05BBEC02181 for ; Sun, 12 Jan 2025 14:55:14 +0000 (UTC) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.79]) by mx.groups.io with SMTP id smtpd.web10.36965.1736693706488568100 for ; Sun, 12 Jan 2025 06:55:06 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@agilent.com header.s=selector1 header.b=lefEvksj; 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.244.79, mailfrom: chris.laplante@agilent.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kiZgSX800y8b3Ogc5hmLkVARd/yJb+w/nlHAHGebRTRQ5dfe7BZ/oD8KRh7zsY7Dp+SJml5MgQRnssIXxCY9nsCt3F1rnhm7AqV8BH1qK0HttZ9P0ErZxNiRHNQkQOPeIEbIYINwH9YL/C6ldA9VQlzhxAUKv40MCDLK4d8XuFBJQXH8Nylz0xedzu+joqr5U351DfZsc3rf1EVTUlqkCMAV0EXCC+VUKNP4MeiW2CTuInieuQEmRw40SACBSPq6ZyHJ+/I9tXNZmC6O4CsQXnxOYft6L7DhXtUunxuUzhWZF8Kvjr8FK6we7K2VzsB4gmxcyjXF3ux1yv6vuZUq8A== 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=tsVmsBfVSeyxYPsYR8L4KO4Gi4wZQWK6p3iX21/+iqo=; b=p1NhzmpfBpcWB/KlcqIwKViZWHsL46R7Y36GTZI4vU4LsaG4OFLqYO6fFGEiWgSEkf56ZOv8g94spPzwvvYuQ4xUy1q1fIp7DI72x7TGYhzJmXH+HckZYIntmj30kZDehl4C9SpRhCkFr/ekdyC7CKmPv0sCpd2XlJtgGhmhPdpyUbS3jU83VKo1fua3090Ihzv/XZPvuViDtEhEhkHiYssGAaZWg9HNZcy5w+c258uiOUIoSNJvTbpqpmZN7MIzPHjvmlgR+j0REeLY+Cvvm2Azc0PaLGjC7RI9Ze+59ya649K0bDJJGMAu7swSwO/csu83jtlZyRrp75A08YNF7w== 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=tsVmsBfVSeyxYPsYR8L4KO4Gi4wZQWK6p3iX21/+iqo=; b=lefEvksjJdVHpR765e6OJKGzjlvqcJ/LWjcu7yOF1/xdkNymf6licFZVwFyPCfDBgZ1Ur1pwij5NbGF9zP29h5KUNy3MXSDxCRqy9NPX9Wq559ChLhv19Nrnd9WFWPSPzNsEZYIKvA7sU2G3w/dm0kpS0JNdMNu8foTYWyukY19xJJcrOM/9bs473xlxzSJ27lWkn54pcb3itb3PPCNE8C2dM+4TyyEX6yyaA+ZB4uFyR6AXEhCJWOGDLeG+kB7X3MbNxTo02a5VWCGDIodJSl8NUZkLaHrxV0u0/r9QwmbD/BDdJpfRwwAVkR44kpooK3jNxxPL6iIzQQKlVhT4rQ== Received: from BN9PR03CA0394.namprd03.prod.outlook.com (2603:10b6:408:111::9) by IA1PR12MB6090.namprd12.prod.outlook.com (2603:10b6:208:3ee::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.17; Sun, 12 Jan 2025 14:55:02 +0000 Received: from BN1PEPF00005FFC.namprd05.prod.outlook.com (2603:10b6:408:111:cafe::7b) by BN9PR03CA0394.outlook.office365.com (2603:10b6:408:111::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8335.17 via Frontend Transport; Sun, 12 Jan 2025 14:55:02 +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 BN1PEPF00005FFC.mail.protection.outlook.com (10.167.243.228) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.11 via Frontend Transport; Sun, 12 Jan 2025 14:55:02 +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; Sun, 12 Jan 2025 07:54:57 -0700 From: To: CC: Chris Laplante Subject: [PATCH 6/7] devtool: misc cleanups Date: Sun, 12 Jan 2025 09:53:58 -0500 Message-ID: <20250112145359.607585-7-chris.laplante@agilent.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250112145359.607585-1-chris.laplante@agilent.com> References: <20250112145359.607585-1-chris.laplante@agilent.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00005FFC:EE_|IA1PR12MB6090:EE_ X-MS-Office365-Filtering-Correlation-Id: 61441c54-b3c1-4d03-e325-08dd33191806 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: rL63ONyfmcVXI5gXmiyN1FmUBCub2KKTC/5Ua2w8vxpUiQPOzXnmWNcEkCA5ZFFnEabyFWmsOwDDIx2/gFs9jGLA5oAsxAwXBHd2q4JF30zALH43C3CHC75gpaG+HmEkryLHkJbs1VAzZ7Gq8n3q4eNwj568E3TpqZ0WQZTJrP8/SHpKZNf5Y7FGLIIlvaWgVIexMe8Bzl3O1rMCAkYvmZPIYNYart37oCelYdLE9OaAmahvwYRW+055IZMSNBTREGno6aFnvSIuX/iZBlFC1N3hM1ezxH6n0glFoUSAzqNvJ0Idix9kXPq4tWKJibm2HwtP/R4A8xUN965dI762bz5VuZcVKW8gKjIsKptCKKfb3HGfv+I7iFn7bXY0izWuz0Ry9Ev0BU/0mgPTmQ/EZAAuyCFmwRgMNlcrCopIw1HpY9W6KwdcY5ds/h9AxOUj03+aoIhvp1yCT2EPyhkphHAadx/dKgoN4PfXuCJpRP/iop18yXHCuHkchrYrWi3/M6RT68VLraiEoOatQ3an6/cZH8OMnhOVE5G5CwWPC8Tu3jVZf0fVDWJIPNDH+vUEFtUL6eNlo+5a9CGD/qotI8u8E+858noBVoUwqDg1jw9HwWS+HcV8BpXsW+tq78FVi/w8B1x4viW29XvM+iLXe7d3teUSyHTcmXBfHpegA+puklImyaXktRHi3GM0/VbWBfLHPSBVdfEYZDnbyIvlbax/NVDCvnsqsYJ3QIv3zYZ/xDWWfP1uVic4DWJxxCE3NX24UfKBqWP6/xvz6PLi+SZbbEgra+Jw9bDiDB9s3oVxFzllYOycJtpPKqkuqYIvEvpEGMYUYQ3mzFJvE5BnQMudelcFRkgvuc1uEicxXyNk/pwHcY/StXolKfyHFCe2KHidUVpT/HQ+FI1YNaZbdjBOuTQLtnpb8r0IR/4+LVUcZ/MlmLqToz1gEzK1T57WXocyqNpHFjGg7uS5X6iq2MbIWGFsu5kXXh9xOZDvRCeXwg+mSSHeSHyI1Aktu8fQmXDBpxpIn4s1di9ULzAkX0xB8BDLbepYBn1h7wmLt83ImXhRhB1IGVacu1zstla0nfU8AFUClpUA7SXfhiiQper8NBcTPRNDUqlV/g4cpJr8GEbVvfCvQydEfWBHzLqruhhOW8Magb+8z1t7GgVbit8UdrccC4RaWCdQVEZvctvzPcL9+2P7IK2k6PsBxxkbPqEjmh8+Jd7V8hCN/YF9M/gyr2RWM4FAA7iIZGpZBRUFMZF7jfYRS3FyjqaDGQcCQB+de8yANckwpm9/jSzBaYXYDEZLhEMuue/ya4I7yYNoz+NvuGucJEcvay7lKg/++yhfwQ8lYWUMQt5sFw82BjBHyNWI3LXqT+H+8EWwtZmnM/voQNfc66ULvoPYwU9yi1OBd7zrhe6zt8G3Z6pfXz8gtYhGUrpdXX8+Av8EP7EmasGxMkQD0w1hFmBkW5I8sUle9s++fYaw8Q0Ewp0j/Q== 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)(36860700013)(1800799024)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: agilent.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2025 14:55:02.5531 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 61441c54-b3c1-4d03-e325-08dd33191806 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-BN1PEPF00005FFC.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6090 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 ; Sun, 12 Jan 2025 14:55:14 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209693 From: Chris Laplante 1. Bad None comparison 2. Reliance on transitive includes in bb 3. Unbound 'ret' variable Signed-off-by: Chris Laplante --- scripts/devtool | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/devtool b/scripts/devtool index b43a958497..1994d4b507 100755 --- a/scripts/devtool +++ b/scripts/devtool @@ -45,7 +45,7 @@ class ConfigHandler: try: ret = self.config_obj.get(section, option) except (configparser.NoOptionError, configparser.NoSectionError): - if default != None: + if default is not None: ret = default else: raise @@ -147,7 +147,7 @@ def create_workspace(args, config, basepath, workspace): _enable_workspace_layer(workspacedir, config, basepath) def _create_workspace(workspacedir, config, basepath, layerseries=None): - import bb + import bb.utils confdir = os.path.join(workspacedir, 'conf') if os.path.exists(os.path.join(confdir, 'layer.conf')): @@ -192,7 +192,7 @@ def _create_workspace(workspacedir, config, basepath, layerseries=None): def _enable_workspace_layer(workspacedir, config, basepath): """Ensure the workspace layer is in bblayers.conf""" - import bb + import bb.utils bblayers_conf = os.path.join(basepath, 'conf', 'bblayers.conf') if not os.path.exists(bblayers_conf): logger.error('Unable to find bblayers.conf') @@ -286,6 +286,7 @@ def main(): scriptutils.logger_setup_color(logger, global_args.color) if global_args.bbpath is None: + import bb try: tinfoil = setup_tinfoil(config_only=True, basepath=basepath) try: @@ -341,6 +342,7 @@ def main(): ret = err.exitcode except argparse_oe.ArgumentUsageError as ae: parser.error_subcommand(ae.message, ae.subcommand) + ret = 2 return ret From patchwork Sun Jan 12 14:53:59 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: 55398 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 EF9AEE7719E for ; Sun, 12 Jan 2025 14:55:13 +0000 (UTC) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.86]) by mx.groups.io with SMTP id smtpd.web11.37273.1736693709308107210 for ; Sun, 12 Jan 2025 06:55:09 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@agilent.com header.s=selector1 header.b=RrCFKMpm; 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.94.86, mailfrom: chris.laplante@agilent.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Zo1XRK4Up4Oci6KcQjSTbBnEyi4HNkO5JRg/ZegGolvOX5+wYE3RpnubE/nxnbr8Bs/2prx25owhzddRABgh9yQyFUUavH7hxKd2e5R3e2rDCTazWkzw4Wd/mh+n48MsTuRnI+90+3AFQQEJRd0bFMJVRcWfnWub+0QmmkBah5b3l2qfKCM7JwHOAm1UoO78aUGNnmsocgXRJqVNqXUioo1jHZc/neNCIqv226FkPP3ObmP2OONzy703lFoXF6MQKHJuqHWHSzX0ei9HhgUz/Zj3vszEFnAdAB/6TEaNRonXkVXYsG/i+ogW1HS0GjW5X+ZP2ZKwVh4uLuMPy+OWdA== 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=o3gbBIlny30UJPjxDvOcDCHD1OaIWUXTv96rtAwnaWs=; b=J3QEjR0ZPSq/GTba4rHZ76qMWEZpk4RSt5MS24veN4n6YdCGKGJSnKbiQV91f+xDCwxUlhDhANsuwO0ub3SUwSUTBYZcoHSNzs4mAHUElVjyXIIX3pE98bMofT0BU8pmLl5OmAVSK60GuROxJuI8u8phVIjSjL5qseZv1PwOe0cJi+RolaYdgjAZqj7yQp3/p5TCYHVrxjU/045TaEHefq48ctxq6fMd+yLwJQERCFcH89/tKjcp7jZ8+IcA56K+obBjsgmZ9Xa9Ulrq/F1uNM8FCnylevR2/aBNB1VvawHYOuT/79cEWzoC3QBOLPtMqS2dW22nXqRNUcOQ7rF3YQ== 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=o3gbBIlny30UJPjxDvOcDCHD1OaIWUXTv96rtAwnaWs=; b=RrCFKMpmELsh29+j85dk6lWLUJYL3acX3HKPYLTpMLX9XIybrt/ojYR6M1ctzZAPZC3tG+6vZWitFo8mQGnLEjR5g2Cr4BoC48n9usTxQui9d3v4HLn6mLAwQJky169o0TtR6R/GnG2xDkyFPN00xhBlQiccZvcG9v1LTzkDIz3Rsrb0r8Omm7omV9TjSDVZ6kl/C0WxzqmVo+6CwDAHgIwD0QUcG3O2tjNj1wK+aUvQ4lwYN/YAGq2ww7chj7bUgLltZUjPYW38dKjcix2DFgF1JqcR2G7ST6jc85pzPthKEa88Lmag43srvZEg3MD7Qh5zjcCeOcr8a6kKWEgssA== Received: from BN1PR13CA0028.namprd13.prod.outlook.com (2603:10b6:408:e2::33) by SJ2PR12MB7942.namprd12.prod.outlook.com (2603:10b6:a03:4c3::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.18; Sun, 12 Jan 2025 14:55:05 +0000 Received: from BN1PEPF00005FFF.namprd05.prod.outlook.com (2603:10b6:408:e2:cafe::92) by BN1PR13CA0028.outlook.office365.com (2603:10b6:408:e2::33) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.10 via Frontend Transport; Sun, 12 Jan 2025 14:55:04 +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 BN1PEPF00005FFF.mail.protection.outlook.com (10.167.243.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.11 via Frontend Transport; Sun, 12 Jan 2025 14:55:04 +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; Sun, 12 Jan 2025 07:54:58 -0700 From: To: CC: Chris Laplante Subject: [PATCH 7/7] devtool: remove unused 'config' param from '_create_workspace' method Date: Sun, 12 Jan 2025 09:53:59 -0500 Message-ID: <20250112145359.607585-8-chris.laplante@agilent.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250112145359.607585-1-chris.laplante@agilent.com> References: <20250112145359.607585-1-chris.laplante@agilent.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00005FFF:EE_|SJ2PR12MB7942:EE_ X-MS-Office365-Filtering-Correlation-Id: a015eaf1-5ecb-42cc-8588-08dd33191936 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: rwHZxRaWNOdWr7dhzr22E19zvtaXieJbvuUlJznBNfRlr43Ob3ig/SrAj0rcqNT04az71yc3lswV9nDPYPShbFKgb+DfkakacT08Qp23v2Pwcz7mpf7BIDz3azWc10oud0jvz1Ju6K1dyAHpEd0pi6ompiY9/riXIdC1lboBBzj+avpePcrYZweu20iIQuZHek9JyR0q0nTwqqUqKYRmhkUpfPpXTQLOYge3mUGnRCWfhTDBsxgC5FP9NSc1PoDGP8shvrQCWb47SnIbyoEA017KXQs1zMwXcLS+z+NMJ/KnnnphNF73rHMFbxqJzJpZBfDzz2qBknZwpyoBQdnUod/imTCXbKhWdLlZQcVqSMYgDI/dFDFg0aYWuucHImUqqmjjDc79VbgroI0GOcAcc6c63/7QXWV85G6kzulaZ+n9qXLnKPE7ddTqRmhuWQXwoN9yTQUxO/SCuNXWHtAw9UdX0kSDMbmZ4VbWwPEP4zKOHqWFSxcWrVWrBfZvtcTdE4Z16mP6KjiA6QoZZCPm95R2LbssidFTpCrHxcxMhho/Xtcz2iGBMeBpMW97vsZtJeItHJISLEyF/CXuzjZSsdgaDfBcWrvv2DSgfo27cbGO+FP63fZetuYLwnTCf9rWMbMMV4wi3pU6CflcePszh3Cwa+1kJypmgESCiAiBK/1c3qsFa/AuteNJNw39yzK9Q6dwPNO3tRF9siZzphjTufiZpbUv9govQ+oUz2JOgN/WTF4ZRqveoTPrxGHQYphhW0jglRPkvZL3T3/Jt4ljJKdCW7jPpYX7ftGJ+uqHEtSs5K0+cBXU1z0w2Yb6JiRkbL1Rur8+YG9/b67dueM/fS8inBUssh6EjgqfZLZYqGT+i6AmiCI9p6EfL2F1GJ6F88f79iADc9PSXayfw90R3rMb5Jd4RdTPEGjmxUGgaETzAsytcMwO8vvXm23jznth66d538mABVUq+Rtfg1kvOGRDIEKu2oS7VVwNh9NJF0jjWXb2sLCfFtN44hlyrCbRKeRjQb56g0evr/60MAsiFaXDQELTJ5YVuJ7+dRSe1Txx5vKjY1NRzEylXQjgXQWNt/mNG3EbMUNbadko/vhFHGPoJUpEQ5tnkXY7pmVUHh4kk4L+BLSD2Cg1CfQI3yV2t3D4qdiV1g9ceKCcsbmH3jYvCCbUtwP0p/jd9rHycn6zIcrG2LzlqvdSCY6y92GM5ANbtfSzC/5GuCJgRMfZJpxIPsVjsmibGzaERSmmmr/llMcVUlG+Jv1U+X5Jn4bUwuLbkQjJaSUy/WS90+nRE05WvZmSu0i0QSjG4V7qM9wbuPJ5/wATffJUWZ8MqOnaf85bv7NWJ5mt3La7qQz7drMI1prmS0MNFICvIN00pRzKYZ7HVnr587a4Ma6/UsOYzHgEIXuJJUT3fcd9vSk1cVJ8VmiJvpse/iOIHUSgKNhPUpdWXWSxZU3TrChNdasAip11Pegffy6sVn5d/VyPDg== 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)(36860700013)(1800799024)(376014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: agilent.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2025 14:55:04.5274 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a015eaf1-5ecb-42cc-8588-08dd33191936 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-BN1PEPF00005FFF.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB7942 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 ; Sun, 12 Jan 2025 14:55:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209696 From: Chris Laplante Signed-off-by: Chris Laplante --- scripts/devtool | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/devtool b/scripts/devtool index 1994d4b507..ebd3e4c11b 100755 --- a/scripts/devtool +++ b/scripts/devtool @@ -95,7 +95,7 @@ def read_workspace(basepath, context): sys.exit(1) else: logger.info('Creating workspace layer in %s' % context.config.workspace_path) - _create_workspace(context.config.workspace_path, context.config, basepath) + _create_workspace(context.config.workspace_path, basepath) if not context.fixed_setup: _enable_workspace_layer(context.config.workspace_path, context.config, basepath) @@ -134,7 +134,7 @@ def read_workspace(basepath, context): return workspace -def create_workspace(args, config, basepath, workspace): +def create_workspace(args, config, basepath, _workspace): if args.layerpath: workspacedir = os.path.abspath(args.layerpath) else: @@ -142,11 +142,11 @@ def create_workspace(args, config, basepath, workspace): layerseries = None if args.layerseries: layerseries = args.layerseries - _create_workspace(workspacedir, config, basepath, layerseries) + _create_workspace(workspacedir, basepath, layerseries) if not args.create_only: _enable_workspace_layer(workspacedir, config, basepath) -def _create_workspace(workspacedir, config, basepath, layerseries=None): +def _create_workspace(workspacedir, basepath, layerseries=None): import bb.utils confdir = os.path.join(workspacedir, 'conf')