From patchwork Wed Sep 27 17:16:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Kjellerstedt X-Patchwork-Id: 31264 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 C90E0E82CB7 for ; Wed, 27 Sep 2023 17:16:35 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.58]) by mx.groups.io with SMTP id smtpd.web10.22978.1695834987265342611 for ; Wed, 27 Sep 2023 10:16:27 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@axis.com header.s=selector1 header.b=pk4grOP8; spf=pass (domain: axis.com, ip: 40.107.13.58, mailfrom: peter.kjellerstedt@axis.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NS+wc/dwX06AWhC+QKD/EfXDORAKjzS7vZd/58PMZ0jhCvf/QhbdDWN9e+mogI6pMalD8QYbZnoCk8KtIR1emlA61uC8ew1nzw/nLhu0AMU2/kNmF3Z17kCavrj4axvhO78PTEou1pxi8hOSH3IE/pqD0jkOeKMORayeNtdVwcZcp7OUjyBPbH7dd8QbLdvCgvZKkpflHhNM8vr/9v3+8Ij8n9LBacYd9gmoI/WxXJiZBR0A47hFAF2igHYO0HWapOULmSVZkcRtbQ25Mqfq8/gO8fI04USpi2ZrFKPkJHmNtbhw2kbnahbS3eDuOABETdQ6lYhRJjJ/ZZQVFhOkaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=758i72X5GZfWaWvu9/43TI8d5wC6k9+/HIbY9SQYoJ0=; b=VyNlpi1s4S9py/Ts48b/wqyc3sqcEX0+Plak+xhZmBSC/EkLbvwlnKENi9xix3EyPT3Eb6LdfUUk8ogE00VMKCFV361nFlIz0wXYZp6orPvTNracWkhpMAdPtfYFd4jCTJuGWhwp1sLuRWyUdTkxk8Tch1AdlUjE7/ZFAo1w5lJ1iOjZZAtmKg9dCWrWG/vvcQoVYnvyCRjnIx/j2CKU9CfgAOEQ6ksUc71+HOYAoigcJZI2jC1VamiBkoiIQMzvArPGuVhtIlGNRSmVOJZMQ/BxlakVpRkiYD2L0ArPK6y1S1UaIqVc3TyZB93j0svG9VCys3YZ2K9gqg5pjzsYLg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 195.60.68.100) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=axis.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=758i72X5GZfWaWvu9/43TI8d5wC6k9+/HIbY9SQYoJ0=; b=pk4grOP8y1VjWLqOKChvkU5xch1s+2Z9OEM/8oqSMxZT0y59PZQ2MmukfaVB8/w+MJVIuSPQN/WGxIoutWF3skjf15pei8lXzNgxPQjKx8ZV3CEDK16fGmUwMepRE3nh7sS6K0MXWUODYG9YuTvKU3CWikDtmu9/6ZeKdYixs24= Received: from AS9PR0301CA0038.eurprd03.prod.outlook.com (2603:10a6:20b:469::9) by DBAPR02MB6357.eurprd02.prod.outlook.com (2603:10a6:10:197::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Wed, 27 Sep 2023 17:16:23 +0000 Received: from AM2PEPF0001C717.eurprd05.prod.outlook.com (2603:10a6:20b:469:cafe::dc) by AS9PR0301CA0038.outlook.office365.com (2603:10a6:20b:469::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.35 via Frontend Transport; Wed, 27 Sep 2023 17:16:23 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=axis.com; Received-SPF: Fail (protection.outlook.com: domain of axis.com does not designate 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; Received: from mail.axis.com (195.60.68.100) by AM2PEPF0001C717.mail.protection.outlook.com (10.167.16.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.14 via Frontend Transport; Wed, 27 Sep 2023 17:16:23 +0000 Received: from SE-MAIL21W.axis.com (10.20.40.16) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 27 Sep 2023 19:16:22 +0200 Received: from se-mail01w.axis.com (10.20.40.7) by SE-MAIL21W.axis.com (10.20.40.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 27 Sep 2023 19:16:22 +0200 Received: from se-intmail02x.se.axis.com (10.0.5.60) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Wed, 27 Sep 2023 19:16:22 +0200 Received: from saur (saur.se.axis.com [10.92.3.10]) by se-intmail02x.se.axis.com (Postfix) with ESMTP id 975AD1A75 for ; Wed, 27 Sep 2023 19:16:22 +0200 (CEST) Received: from saur.se.axis.com (localhost [127.0.0.1]) by saur (8.17.1/8.15.2) with ESMTPS id 38RHGMX23352829 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Wed, 27 Sep 2023 19:16:22 +0200 Received: (from pkj@localhost) by saur.se.axis.com (8.17.1/8.17.1/Submit) id 38RHGMco3352828 for bitbake-devel@lists.openembedded.org; Wed, 27 Sep 2023 19:16:22 +0200 From: Peter Kjellerstedt To: Subject: [PATCHv3 1/4] bitbake-getvar: Add a (suppressable) error for undefined variables Date: Wed, 27 Sep 2023 19:16:16 +0200 Message-ID: <20230927171619.3352810-1-pkj@axis.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM2PEPF0001C717:EE_|DBAPR02MB6357:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b56e474-ea5e-4b1c-bfad-08dbbf7d7966 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kc9JyzFOjC+rvE+X/e/Gb0sDPZ5fQv/9yQzRRqmwMBsshpLzyknrr9BmPPkDpfh1L7ZnX+WkwXbAJtKF5cnByjQ1VOTE7tvvsRUf8C8fj3bRsxrGtiZ24ogooCi4dPHN6R7qTTuaXusLSpCFUrGLaTCuEdeI9geTV4bVMlRE0JC0ljiK4LacZmYJk++zgvF+G2Ouq51+2kR9MyYCi/FRotFVwxCX0u8W8fjuQgw/+RwUFEXcZS9IsvfJsfB0yDErhmpjVVHaCpdsjNEXPepGqP7abiPDU7Gk6HLS312ZjfArvypk+uo1Y9vXIh/LrPb7jq8014zksmawkHXyolO5lf379Ut36r8p15fQUWhMhiOIfWwlYDH5fhSDDpLDFmpglDNQlsyVOxsllPh9B+lsgpCVlIs3WODIBBqwQDS3GsuoJgLZOT8OsWvzLuYQsWTy8XGBeNSEfPqI5qXr9EQa/lTUPY0/0jpMaSKfHShmT0WKFBggMLTRmXRT9ipSBSbXIRoIcDUi/oroi+ZiSbF44q3tV7wrSZtt6ZeTLpMCyN0RpnDUOOzDpSzT40xYbU0lawrewYQK1u4XK7TPkqjjo58QxhIjd4MrKyFq4ZhVzCdeNQMXVQQV1lToYEtibDFMFS6pNP/FCywlEewWBLidkdYrZKgJQETxW+a75kvJrV4Fj6e5+GRhXn8I4MeJ3U9vMosBf1+jIBGoo76bBxkC+T/fwoghiWT7i9/YXQbZpcvDAU3sQbXlyDjOu+dIU31e5AJ3ifNoxz9zKuNKTWSoAg== X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(39850400004)(136003)(376002)(346002)(396003)(230922051799003)(1800799009)(451199024)(82310400011)(186009)(40470700004)(46966006)(36840700001)(356005)(2906002)(40460700003)(26005)(6666004)(336012)(82740400003)(70586007)(1076003)(36860700001)(70206006)(47076005)(81166007)(478600001)(316002)(83380400001)(5660300002)(40480700001)(42186006)(6916009)(36756003)(8676002)(8936002)(426003)(2616005)(41300700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2023 17:16:23.1338 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5b56e474-ea5e-4b1c-bfad-08dbbf7d7966 X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: AM2PEPF0001C717.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR02MB6357 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 ; Wed, 27 Sep 2023 17:16:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15139 If an undefined variable or variable flag is specified, bitbake-getvar will now fail with an error message indicating this. The error can be supressed with --ignore-undefined, which matches the previous behavior. This also changes the errors related to specifying --flag or --unexpand without --value so that they are sent to stderr rather than stdout. Signed-off-by: Peter Kjellerstedt --- PATCHv2: New solution based on the discussion after the previous patch. PATCHv3: Dropped the idea with the --default option and instead went with errors for undefined variables, that can be supressed. Also split the changes into multiple commits to make it more clear what is happening. bitbake/bin/bitbake-getvar | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/bitbake/bin/bitbake-getvar b/bitbake/bin/bitbake-getvar index afd2849846..53ab900693 100755 --- a/bitbake/bin/bitbake-getvar +++ b/bitbake/bin/bitbake-getvar @@ -26,15 +26,15 @@ if __name__ == "__main__": parser.add_argument('-f', '--flag', help='Specify a variable flag to query (with --value)', default=None) parser.add_argument('--value', help='Only report the value, no history and no variable name', action="store_true") parser.add_argument('-q', '--quiet', help='Silence bitbake server logging', action="store_true") + parser.add_argument('--ignore-undefined', help='Suppress any errors related to undefined variables', action="store_true") args = parser.parse_args() - if args.unexpand and not args.value: - print("--unexpand only makes sense with --value") - sys.exit(1) + if not args.value: + if args.unexpand: + sys.exit("--unexpand only makes sense with --value") - if args.flag and not args.value: - print("--flag only makes sense with --value") - sys.exit(1) + if args.flag: + sys.exit("--flag only makes sense with --value") quiet = args.quiet or args.value with bb.tinfoil.Tinfoil(tracking=True, setup_logging=not quiet) as tinfoil: @@ -44,9 +44,17 @@ if __name__ == "__main__": else: tinfoil.prepare(quiet=2, config_only=True) d = tinfoil.config_data + + value = None if args.flag: - print(str(d.getVarFlag(args.variable, args.flag, expand=(not args.unexpand)))) - elif args.value: - print(str(d.getVar(args.variable, expand=(not args.unexpand)))) + value = d.getVarFlag(args.variable, args.flag, expand=not args.unexpand) + if value is None and not args.ignore_undefined: + sys.exit(f"The flag '{args.flag}' is not defined for variable '{args.variable}'") + else: + value = d.getVar(args.variable, expand=not args.unexpand) + if value is None and not args.ignore_undefined: + sys.exit(f"The variable '{args.variable}' is not defined") + if args.value: + print(str(value)) else: bb.data.emit_var(args.variable, d=d, all=True) From patchwork Wed Sep 27 17:16:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Kjellerstedt X-Patchwork-Id: 31266 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 DA871E82CBA for ; Wed, 27 Sep 2023 17:16:35 +0000 (UTC) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (EUR03-DBA-obe.outbound.protection.outlook.com [40.107.104.73]) by mx.groups.io with SMTP id smtpd.web10.22977.1695834986868874877 for ; Wed, 27 Sep 2023 10:16:27 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@axis.com header.s=selector1 header.b=AapCveEH; spf=pass (domain: axis.com, ip: 40.107.104.73, mailfrom: peter.kjellerstedt@axis.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i2mm2yIF1ORsPvX8o9YL5/WQPzDAdu1052Pq++eHhWOD1zP4os7WASS0yLBLksvM1YBFT1h06WRZoUYCdWBybuvmB/PYdCN5Qp5flYp7YGrMhRX79IN06mp16WB6IMkdSy/n4n7XyiU2rWIFhim80DzBsYKnv8JHS0KKVZLUEzEpB/v+PEFkaRRamGExVUo8VJbFx+1Nc0MQa1zrUqm/t8HtMo3R8c49j0AllqQx4fF4HeEi8Jd/2aUdPoKhRGx1qVE8sZx+qBKq+z/UVBpyvgPt09e4JYOmTA7o6Opp0Gx4JqXMdjYqVnYQIMFUmB1F8EEvq9aunLVokL3rFEgktA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=DyxhP5z4xjX8JO1UU4jal7OJXsrH76WZffqDE0tobtM=; b=WYZYk1ThDfxpjR/C+Mgc98JrgVD+bXShvZoEo+oVj/aVzqDZENN/2lx9/mVvJDP2tBZtiwTSVUqIods3UGYsp8ptCnf2xaKZDXN8m7M1gSn/b7H1nm9tvjPDYd1kTdLQh++Gbu4FPBmKu3x0yoSSboClVHzLidKtSEKY8j1Obma2Mj4AGdXXmyHXAPyv2zSewscCSphDQJ1hl99kgJZ7/4vsSs1pzwqAT2C5rPveGKwj6h9Mjom/m3jTFL5ZOZP/Ssxc30uq8rFGjQ9UZ+zZY30892TECQmziZ/dYw2gqkC+G0iwux9NVkghxxDAz3YU5Sjtwy/0JCmzm+gMNx7vxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 195.60.68.100) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=axis.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DyxhP5z4xjX8JO1UU4jal7OJXsrH76WZffqDE0tobtM=; b=AapCveEHliSHrCUeADEKZ+uZy9GkChCAeaJH6uG7BdiKro0yDhYaliZt9NdEkI4Q1SNMR3js/PzE20kemmbSxoOHRFJa7qDT1TDYyO9NkCzlaCEM58ZFmX+uAikzTgXGbSGgfL5+L+ESRFjmXLGNDLZG7tzantzDshuuEZ/oiaE= Received: from AS9PR0301CA0040.eurprd03.prod.outlook.com (2603:10a6:20b:469::26) by PAXPR02MB7325.eurprd02.prod.outlook.com (2603:10a6:102:1c5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Wed, 27 Sep 2023 17:16:23 +0000 Received: from AM2PEPF0001C717.eurprd05.prod.outlook.com (2603:10a6:20b:469:cafe::cf) by AS9PR0301CA0040.outlook.office365.com (2603:10a6:20b:469::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 17:16:23 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=axis.com; Received-SPF: Fail (protection.outlook.com: domain of axis.com does not designate 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; Received: from mail.axis.com (195.60.68.100) by AM2PEPF0001C717.mail.protection.outlook.com (10.167.16.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.14 via Frontend Transport; Wed, 27 Sep 2023 17:16:23 +0000 Received: from SE-MAIL21W.axis.com (10.20.40.16) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 27 Sep 2023 19:16:23 +0200 Received: from se-mail01w.axis.com (10.20.40.7) by SE-MAIL21W.axis.com (10.20.40.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 27 Sep 2023 19:16:22 +0200 Received: from se-intmail02x.se.axis.com (10.0.5.60) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Wed, 27 Sep 2023 19:16:22 +0200 Received: from saur (saur.se.axis.com [10.92.3.10]) by se-intmail02x.se.axis.com (Postfix) with ESMTP id AA8402A66 for ; Wed, 27 Sep 2023 19:16:22 +0200 (CEST) Received: from saur.se.axis.com (localhost [127.0.0.1]) by saur (8.17.1/8.15.2) with ESMTPS id 38RHGMAR3352833 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Wed, 27 Sep 2023 19:16:22 +0200 Received: (from pkj@localhost) by saur.se.axis.com (8.17.1/8.17.1/Submit) id 38RHGMuo3352832 for bitbake-devel@lists.openembedded.org; Wed, 27 Sep 2023 19:16:22 +0200 From: Peter Kjellerstedt To: Subject: [PATCHv3 2/4] bitbake-getvar: Treat undefined variables as empty with --value Date: Wed, 27 Sep 2023 19:16:17 +0200 Message-ID: <20230927171619.3352810-2-pkj@axis.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230927171619.3352810-1-pkj@axis.com> References: <20230927171619.3352810-1-pkj@axis.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM2PEPF0001C717:EE_|PAXPR02MB7325:EE_ X-MS-Office365-Filtering-Correlation-Id: b6bf34bb-8abe-4428-e274-08dbbf7d79ca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FCtEhcVB/dDnlwCNWF8WriB7G7uc66mNAiao9Y04xKLlmnU28H0NsDQy1LD4kF2l7cFsMwrCZ1amv0mEzqKx7Ad+/3Dv6TILfuUGBk+T53JyKNA6F40cEfvMHqMjUfhBBuMdhK74rbzmbXnbjTvzRglv8m8moA3hTO0ioGBTcK+FbXgVQQ6r5+ml4cLS776BuyhXSCjm/gnt92pk357iLY/vK0LY9TDbNALJN/ME1qdFqpP94vbAXNd/G6tGsyLytIl27IXGhMKMBrQeLXn//uTSUmekClDWWlz4RLcBJFp2Hz9xHhHoKqpAGwGrOCKSt6ytT3brots0Q/GyQjlD7ZVPEOmB6557DHqFMUeak+RwEn0kbf4QjUKau/MO5s5UM2GJ2Khn6Q4wK7rS5oRJCvW/wFCJrkJbyZlP2ZR39ryiR+EWqVXroPEMiKoW9I5CAjVRgugPKC1ir4QuY8Dlj//QGicdatH/ypLIioxhlTV6H+dPz76gO9/pQDHXkwzZ1yu6hSzA2IqvGYZ78NW7s7MZvFxKtndAUUFR9SwsBXtCmPaU8kfdnHsOkWskYkrtApEQqvXIKEzwI1BwTQcmjWRolDIyHdFVLNH8xhHIZGp94E9z8ltMEPAYLz7OBFRBkteNXJhpLcumeUrUBJSrSlY3fj2qw9FlHxYQuTf5uRUxvxrfLyLdEMyLH2M9BpA1f2RwRnvd7lZypHYLAr0zsnLzoMFPXmNa8Dmo/RhhUo7Wc8VATdOPqAYjG2vErykkT2GfXhueYSt0KzgJK/bvYg== X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(39860400002)(376002)(346002)(136003)(396003)(230922051799003)(186009)(1800799009)(451199024)(82310400011)(46966006)(40470700004)(36840700001)(40460700003)(6666004)(82740400003)(26005)(336012)(2616005)(1076003)(426003)(70586007)(70206006)(42186006)(478600001)(47076005)(36860700001)(356005)(81166007)(83380400001)(4744005)(2906002)(8936002)(8676002)(6916009)(316002)(41300700001)(40480700001)(5660300002)(36756003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2023 17:16:23.7901 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b6bf34bb-8abe-4428-e274-08dbbf7d79ca X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: AM2PEPF0001C717.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR02MB7325 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 ; Wed, 27 Sep 2023 17:16:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15138 Rather than outputting the string "None" for undefined variables, output only a linefeed (the same as for variables that are defined to the empty string). Signed-off-by: Peter Kjellerstedt --- PATCHv3: Split from the preceding commit. bitbake/bin/bitbake-getvar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/bin/bitbake-getvar b/bitbake/bin/bitbake-getvar index 53ab900693..8901f99ae2 100755 --- a/bitbake/bin/bitbake-getvar +++ b/bitbake/bin/bitbake-getvar @@ -55,6 +55,6 @@ if __name__ == "__main__": if value is None and not args.ignore_undefined: sys.exit(f"The variable '{args.variable}' is not defined") if args.value: - print(str(value)) + print(str(value if value is not None else "")) else: bb.data.emit_var(args.variable, d=d, all=True) From patchwork Wed Sep 27 17:16:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Kjellerstedt X-Patchwork-Id: 31265 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 C705AE82CB5 for ; Wed, 27 Sep 2023 17:16:35 +0000 (UTC) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.86]) by mx.groups.io with SMTP id smtpd.web10.22982.1695834994295475697 for ; Wed, 27 Sep 2023 10:16:34 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@axis.com header.s=selector1 header.b=OmugYh0D; spf=pass (domain: axis.com, ip: 40.107.22.86, mailfrom: peter.kjellerstedt@axis.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B3HNv7nPlUWU06PJEPg7GUntak69UTQeN3sbcOi382zxMCLWGJxCH3BzvGC38vSx+nZDzVdGkuAv7d8GuUDrr+bmijl5SfeH82kevbvzseONuup4HIw3h9T+Kb7InjxdONa4DME2B5dZARNQihTBNO2bI0faFqztB0u6t7zkcuLKEnMVqOurrfG9tKIPO3n+c9EL371lyqJER1Kz0lgkODcIFMEhEwYTkC5wzkg/O+63Jz5aGKaMsYTodcSdgYEDV5tdZCNWxlUCKRn55fKnM8qvkM9js5hFZThqF7FmQqVwBEGB9+AQq2E2mi1NN0n4WLCoH6mRUi5nklX87Z3dJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=JB+B7A8dIcmiSFK9dqaFPffwTAcHpwT6y/8NGuhE6cU=; b=cEqDvbO/0kNO4YDuSPzwJNkxzcwbPmUFU7Qp3SbzAlGZOX8a0O3ImkJDopS9bmu214T/avRkYkn8NttILA4oWjxAPZw6oYLQAHzOexomTiBJxocH9eHjspzuWCe/4US4qXTb1yA3mNP+Gmo8b9WTT6V54ahIaa4wGCzyW1D0zzgPQhHLPz2dij2MXBQFuULKrtObrpbAqrcFB8+3T9UFaaxXutzW5dJiBy+kOJAED4qVP/P6jbbuAfAKjojzX5W5wbV/9NQ0K1O/R2OyRypttqpBs/Og9snz2l3He28UFt2Vx9Veb3PUXbFacHxHUhsekgpNQXMXpEuWPHJ4Cz/ZCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 195.60.68.100) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=axis.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JB+B7A8dIcmiSFK9dqaFPffwTAcHpwT6y/8NGuhE6cU=; b=OmugYh0D2VJbg73rSbDe0guJHXLyLB+K91By78i8kUev3BtaJvwqMorcJwTfxctLAFSxeFcHcP2bMb2RuIwRY+olb1A3o0V1lYk23glrRxsrkTUNrkPdpGR1MLikwyXpWjcCNeVYoaHIo/jQe0csBqYM6pV346o1ZjfgVSO5d6c= Received: from AS9PR0301CA0040.eurprd03.prod.outlook.com (2603:10a6:20b:469::26) by AS2PR02MB10315.eurprd02.prod.outlook.com (2603:10a6:20b:647::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Wed, 27 Sep 2023 17:16:24 +0000 Received: from AM2PEPF0001C717.eurprd05.prod.outlook.com (2603:10a6:20b:469:cafe::d4) by AS9PR0301CA0040.outlook.office365.com (2603:10a6:20b:469::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 17:16:24 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=axis.com; Received-SPF: Fail (protection.outlook.com: domain of axis.com does not designate 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; Received: from mail.axis.com (195.60.68.100) by AM2PEPF0001C717.mail.protection.outlook.com (10.167.16.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.14 via Frontend Transport; Wed, 27 Sep 2023 17:16:24 +0000 Received: from SE-MAIL21W.axis.com (10.20.40.16) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 27 Sep 2023 19:16:23 +0200 Received: from se-mail01w.axis.com (10.20.40.7) by SE-MAIL21W.axis.com (10.20.40.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 27 Sep 2023 19:16:22 +0200 Received: from se-intmail02x.se.axis.com (10.0.5.60) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Wed, 27 Sep 2023 19:16:22 +0200 Received: from saur (saur.se.axis.com [10.92.3.10]) by se-intmail02x.se.axis.com (Postfix) with ESMTP id CC6891A75 for ; Wed, 27 Sep 2023 19:16:22 +0200 (CEST) Received: from saur.se.axis.com (localhost [127.0.0.1]) by saur (8.17.1/8.15.2) with ESMTPS id 38RHGM7b3352837 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Wed, 27 Sep 2023 19:16:22 +0200 Received: (from pkj@localhost) by saur.se.axis.com (8.17.1/8.17.1/Submit) id 38RHGMYl3352836 for bitbake-devel@lists.openembedded.org; Wed, 27 Sep 2023 19:16:22 +0200 From: Peter Kjellerstedt To: Subject: [PATCHv3 3/4] bitbake-getvar: Add -s as short option for --ignore-undefined Date: Wed, 27 Sep 2023 19:16:18 +0200 Message-ID: <20230927171619.3352810-3-pkj@axis.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230927171619.3352810-1-pkj@axis.com> References: <20230927171619.3352810-1-pkj@axis.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM2PEPF0001C717:EE_|AS2PR02MB10315:EE_ X-MS-Office365-Filtering-Correlation-Id: e3986536-0351-462d-f40a-08dbbf7d79fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ds7lMzKVf/nTKC9BemIjlIK/gtvyhmQMq9BqZL9yJt6f/M1EdimM299VvaNgJ5MsC7Lp+Wq1wVO8DMiYo39JtLcQQZ7OtwjCLR/4ST40DO3SYCloG6oum+iDPX84oLddIXklHyLOHBaSaN8moCFEEn2TBbAUd0xeB/Gz7ejrYFUAcBm+1yWb4LMxQBUw+GNqxP1lp+8GimgEmTUtIqjWYMqBeA5UkqYj6OR1vhP1IU+Ritpv7PDV1DRtpYG4rVF3wNaTFzGuZjZkpQClUKiQ7SCx+VAbP90M2kFNruNgBG+lxw0AneQpk7AZwB2AwDWrP1FtoyRAPekbM6MMw1H9jCw9It0HUeAxWIlp1yKHragKQLeFn/0lLsVrSlkGx5LkdLu0WphDLXtamYOkD1xQVa6WlZwcjsxz2fcrkXONxL8VWXqW4l4htKcASHmpKcYHAyPSjvdfvEGhtyJeDLlt8BsE0d/RbWKEnm1LvDf2OdlAXL+NkOUmDoSttGIgnJXtBekfLJv5LYco0s26SNsVsUZUZeBvOweOUL3XLQpbew4/xLYGEWcAt0ChtMtrFoP7cF21Z3Kgf2R1/qXvlXd7Vt9PrnTuRZywJM2c7XhvY/IVWAilAVy9ACIJjknm4E6zSwkChGOunlXWNw7LKzixdJ4f2fsrfj1bmMNSiI6mtctKm89efo0Rt0ck36VSizRJONzdZ4A3AnFsZxwuh7GBtHjE7n2JInhFngWbuL0KiY/M+rAicyB13UlCLQrfGb1KcmJxeT7ZsN+sG2IJRQFKuw== X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(376002)(346002)(39860400002)(396003)(136003)(230922051799003)(451199024)(186009)(1800799009)(82310400011)(46966006)(40470700004)(36840700001)(2906002)(36756003)(40480700001)(5660300002)(26005)(316002)(42186006)(70206006)(70586007)(2616005)(336012)(1076003)(6916009)(426003)(41300700001)(478600001)(8676002)(8936002)(47076005)(40460700003)(82740400003)(356005)(36860700001)(81166007)(6666004)(83380400001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2023 17:16:24.1182 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e3986536-0351-462d-f40a-08dbbf7d79fc X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: AM2PEPF0001C717.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR02MB10315 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 ; Wed, 27 Sep 2023 17:16:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15140 Signed-off-by: Peter Kjellerstedt --- PATCHv3: New in this patch set. bitbake/bin/bitbake-getvar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/bin/bitbake-getvar b/bitbake/bin/bitbake-getvar index 8901f99ae2..1b5bb2e1f5 100755 --- a/bitbake/bin/bitbake-getvar +++ b/bitbake/bin/bitbake-getvar @@ -26,7 +26,7 @@ if __name__ == "__main__": parser.add_argument('-f', '--flag', help='Specify a variable flag to query (with --value)', default=None) parser.add_argument('--value', help='Only report the value, no history and no variable name', action="store_true") parser.add_argument('-q', '--quiet', help='Silence bitbake server logging', action="store_true") - parser.add_argument('--ignore-undefined', help='Suppress any errors related to undefined variables', action="store_true") + parser.add_argument('-s', '--ignore-undefined', help='Suppress any errors related to undefined variables', action="store_true") args = parser.parse_args() if not args.value: From patchwork Wed Sep 27 17:16:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Kjellerstedt X-Patchwork-Id: 31267 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 D9E9BE82CB8 for ; Wed, 27 Sep 2023 17:16:35 +0000 (UTC) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.69]) by mx.groups.io with SMTP id smtpd.web10.22983.1695834994299524384 for ; Wed, 27 Sep 2023 10:16:34 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@axis.com header.s=selector1 header.b=RHaNsrOQ; spf=pass (domain: axis.com, ip: 40.107.22.69, mailfrom: peter.kjellerstedt@axis.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G0CVgwdGTP+1I245uSERQEK6k8mxHXnbevgdDkcqryuo3uXKz7Q0AqCw7i8RY5Rc1DJAVVoTREiSm+JAW6cPTxSb8HqGyaGK5fnromy0GV44GCwlW1F2hbjtCp2QThpqBdBCmxfEnAquFVuzwIiQ+9D7wgfg6VKj6EVu6OpH1vby5LesTwo1qIEGVozVfGr8WuylgmJMpNsiq4j02C3werHeccS9stu3IW0KTwqFiCR7ki94Rz2x8FnAsCUt8yIG0Cy6z5+zFFpjBzAuPvIZpWXb2hHv/QFPtCE3l7mXRneofDFRs3m/EWr4BVN29GeWOpRPI9bBlQa1RqXJnvt1QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=2hBViTYRkP1CE0mEl+Zq/r/4azg081MkHZIOy3CzoHc=; b=lEHJppeN8GrDx/KGWvwscvFrW3zhqMjJNKxMsWtHEILspuc/2LgtQad7mwbFe0R2gwi0GaPQrIaKUCyHE7qXkS2bKRzy53ABKi7kHUQ+KQbLTzL4xxePlS947puZH1c60whg4xB20PB9cPEX8vrCd6j55wHA7r9sIOsNRRyAoZkF+D8YbU6QCibLmfg3ZoJkSpwB54g3dWVql2jeJS0NorWlBK0aOKGXEJoQHhFwnMCELO8iCJcJLZbOzDNVa2Vf3+9I0jyOBILjBvSNb/IQfRdB6SN6llIX4s6EwvP1pBnk399GU+lMfCVJUEr/NG+ie6iWPajSn3wAH+sJZ8NkJQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 195.60.68.100) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=axis.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=axis.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2hBViTYRkP1CE0mEl+Zq/r/4azg081MkHZIOy3CzoHc=; b=RHaNsrOQXZKwhXIE2Ns8CbCH31qTbcivEcACxjS9E4CISy647jpFVzZ/UevDMb9Vj9STyxMic8fOBvPgwnpBmNN8q/LwFF6cP+J+xryesG05s2weRTt+iz/2RE9IaElUhAYX2KIQSlxjmZkMvOKkZEJ9VG2JAiwWLli44Y8v+xk= Received: from AS9PR0301CA0046.eurprd03.prod.outlook.com (2603:10a6:20b:469::6) by PAVPR02MB9843.eurprd02.prod.outlook.com (2603:10a6:102:31a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Wed, 27 Sep 2023 17:16:31 +0000 Received: from AM2PEPF0001C717.eurprd05.prod.outlook.com (2603:10a6:20b:469:cafe::c6) by AS9PR0301CA0046.outlook.office365.com (2603:10a6:20b:469::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 17:16:31 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 195.60.68.100) smtp.mailfrom=axis.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=axis.com; Received-SPF: Fail (protection.outlook.com: domain of axis.com does not designate 195.60.68.100 as permitted sender) receiver=protection.outlook.com; client-ip=195.60.68.100; helo=mail.axis.com; Received: from mail.axis.com (195.60.68.100) by AM2PEPF0001C717.mail.protection.outlook.com (10.167.16.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.14 via Frontend Transport; Wed, 27 Sep 2023 17:16:31 +0000 Received: from SE-MAIL21W.axis.com (10.20.40.16) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 27 Sep 2023 19:16:23 +0200 Received: from se-mail01w.axis.com (10.20.40.7) by SE-MAIL21W.axis.com (10.20.40.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 27 Sep 2023 19:16:23 +0200 Received: from se-intmail02x.se.axis.com (10.0.5.60) by se-mail01w.axis.com (10.20.40.7) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Wed, 27 Sep 2023 19:16:23 +0200 Received: from saur (saur.se.axis.com [10.92.3.10]) by se-intmail02x.se.axis.com (Postfix) with ESMTP id ED45F1A75 for ; Wed, 27 Sep 2023 19:16:22 +0200 (CEST) Received: from saur.se.axis.com (localhost [127.0.0.1]) by saur (8.17.1/8.15.2) with ESMTPS id 38RHGMLr3352841 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Wed, 27 Sep 2023 19:16:22 +0200 Received: (from pkj@localhost) by saur.se.axis.com (8.17.1/8.17.1/Submit) id 38RHGMaD3352840 for bitbake-devel@lists.openembedded.org; Wed, 27 Sep 2023 19:16:22 +0200 From: Peter Kjellerstedt To: Subject: [PATCHv3 4/4] bitbake-getvar: Add -v as short option for --value Date: Wed, 27 Sep 2023 19:16:19 +0200 Message-ID: <20230927171619.3352810-4-pkj@axis.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230927171619.3352810-1-pkj@axis.com> References: <20230927171619.3352810-1-pkj@axis.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM2PEPF0001C717:EE_|PAVPR02MB9843:EE_ X-MS-Office365-Filtering-Correlation-Id: 7aa673a4-2d6f-40e6-4beb-08dbbf7d7e43 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /i9bpHH+q9KsAxcm1MjYpWvEPynjAnQhKR3N3LUd6MptvHIX9NDk0DFZKohrKh+rln2W2fJG9P0QvUVRSRuJHpMk2r6Psf2yhj8N12ik5KF17QDGHmAkzsAM4ermtV7DN17vAPTlb5SR+3gkTu8YSznEV2UxRqdYpO+PAH+M5td0zzsxq/vnnHTjSop/Bcl2rZifEY6h7yPNInlOmxCgJPStKewCX/yVQ03nClfk2G6QXwSP3Qb3CUXvrX6C6rbtI1C5h7Iect/blSid7MQUS48jAXgiPok9qjYf9NAEYdvnn1jd9jfArmiJvwsr/0m0UKV2HY4o0CUxNNT/W7Ky1eHYjGHljWj2mwzqnm/4Wj2Vs7/TuAmSuIYJmHbrCBDqboJlaF3+SYT9E7HIevL8Uz3D86rwG/0WQXHE4xLhcaLQ1p0H2L5PKBZTo9aoZBPEtrOj7jFfR7uIaZxCyvgcUJhKYNYjkzatk10FX1Y7A67uhhQ4kCIhBOm7PhwiRPG8BbC81aLMLyXiuGPwzTWVm1XUIDx6KOy4uBbzj55l3+enRebHKRMgu6mlE851Du8LzcfxOl1TwpH/Bjl/ECXnoX9H/IaRFxbxIlEo3lP38Lv1kw8UJbbl74P+cY32KJjVP+SjDVOjXGWhtrLPZwhJMBJS4BB3ae/gMn2zvVLa7ZOTGMikOIlfDfMD13HBPPchYablJZXlaLJ8RzBKPQx332nL9AdHi4w2rWOkHE8otinwBLYMgXoNgyZASd+J2O+bMdlhIzFEOqvu1lnwLApBeA== X-Forefront-Antispam-Report: CIP:195.60.68.100;CTRY:SE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.axis.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(396003)(346002)(39860400002)(376002)(136003)(230922051799003)(1800799009)(186009)(82310400011)(451199024)(36840700001)(46966006)(40470700004)(42186006)(40460700003)(82740400003)(26005)(2906002)(70586007)(336012)(1076003)(426003)(6666004)(2616005)(36860700001)(478600001)(47076005)(81166007)(83380400001)(5660300002)(8936002)(316002)(8676002)(36756003)(70206006)(41300700001)(356005)(40480700001)(6916009)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: axis.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2023 17:16:31.2901 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7aa673a4-2d6f-40e6-4beb-08dbbf7d7e43 X-MS-Exchange-CrossTenant-Id: 78703d3c-b907-432f-b066-88f7af9ca3af X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=78703d3c-b907-432f-b066-88f7af9ca3af;Ip=[195.60.68.100];Helo=[mail.axis.com] X-MS-Exchange-CrossTenant-AuthSource: AM2PEPF0001C717.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR02MB9843 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 ; Wed, 27 Sep 2023 17:16:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15141 Signed-off-by: Peter Kjellerstedt --- PATCHv3: New in this patch set. bitbake/bin/bitbake-getvar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/bin/bitbake-getvar b/bitbake/bin/bitbake-getvar index 1b5bb2e1f5..22e2cb7d8d 100755 --- a/bitbake/bin/bitbake-getvar +++ b/bitbake/bin/bitbake-getvar @@ -24,7 +24,7 @@ if __name__ == "__main__": parser.add_argument("-r", "--recipe", help="Recipe name to query", default=None, required=False) parser.add_argument('-u', '--unexpand', help='Do not expand the value (with --value)', action="store_true") parser.add_argument('-f', '--flag', help='Specify a variable flag to query (with --value)', default=None) - parser.add_argument('--value', help='Only report the value, no history and no variable name', action="store_true") + parser.add_argument('-v', '--value', help='Only report the value, no history and no variable name', action="store_true") parser.add_argument('-q', '--quiet', help='Silence bitbake server logging', action="store_true") parser.add_argument('-s', '--ignore-undefined', help='Suppress any errors related to undefined variables', action="store_true") args = parser.parse_args()