From patchwork Tue Sep 24 09:09:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Weihmann X-Patchwork-Id: 49496 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 979E4CF9C6B for ; Tue, 24 Sep 2024 09:10:02 +0000 (UTC) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (EUR03-AM7-obe.outbound.protection.outlook.com [40.92.59.102]) by mx.groups.io with SMTP id smtpd.web10.9387.1727169000720366397 for ; Tue, 24 Sep 2024 02:10:01 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@outlook.com header.s=selector1 header.b=Mz7mmEUh; spf=pass (domain: outlook.com, ip: 40.92.59.102, mailfrom: kweihmann@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jmGdw6GNmJcc2XCK6cdPihHh3fmmjXzq8RXJ4m/joaiIiujrnxSo3guWHMs0Olw0CbnWbQ0IVPoWY+OwHvbEXVJ7SRxCsBrR65o28uIRHAlvKo1g6gtW42QahOLav9efByIfb4yQvMRTE9CvkDWtD6y2VVUBuWMKsq3cA0DymU5Dl/6x6Ox6W5q9zPz6KegP5kOxKCg9AGQcQkFfNqQE0xh89TTC3D80piQgnU4tRT2cHae6hhS2PO1+TBvwDyZseN6b3GqIo1oGFb57RA7SsFj+n8GheTHJMTvdzpAt7B6UtWgUBqXoKsYUxWJbyVFJAE4PCSENMTSlDpdzshBMHg== 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=PSCg7ai/FQdGVmXzu0+XcqPXVZPjN6LUutnTT6Z2HBY=; b=Le9RDcp7zTmuYU+CDmdp2rxna5xfWGt93rL+6b+n1511Zbc7JnGlfaBuwhECkH9ZMUKeMG56YxdyL7mzlavi8ZG9GIvSgwLQannoUyYRHasNmqmmb/mBGQePqSyC/DIlAb8ifU35nGvZ1eTTO2AWBvO5eZ8nQKvuu12Cb0D9Tj/DQ40qMVYx8Hp9TC/fIh0s0plcFvoFzYvFDTtr0Zsve/6zEI8TOJsmispoqY4JFOrGfPx0bNUtEs2aXh1BjGXEQvdmpxW+gU8KLKhxWNjU8vKFXhmcxE83hmzMCSwKjriICicSmKy6YgqwktgaKGIrotmuvtdiJVL4nOmIAZVe9g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PSCg7ai/FQdGVmXzu0+XcqPXVZPjN6LUutnTT6Z2HBY=; b=Mz7mmEUhUg31yF7inbgy7SotRkSlrBkbD78Fi+una9ljx4omhslhN0ihDbjNm+bToabEd9EkO0ftb1ZXedrJnmeYhRBENxBn9w78l8L6/GQorDY/5pTYJRKReo7jyFBGopRyIB+DR0djKb9ooIBVaTS0VIgqtMHsW4oFA07ddBDQixbyWeyzvh1EFU0A6nqG2BBHVMFIiRSU2vl+DqtABFPfieDlsHn1DbdaJe8xN6PQIbYGzfD18pSKALePC4LfLgScyeVYeYOw9y/fEDnl6hVbwpdungNOnZpj2XTez2do1UgO9jgvzObi2/jWnD3WfOGqRzvDBkC220LyAxp6Bg== Received: from GV1PR07MB9120.eurprd07.prod.outlook.com (2603:10a6:150:80::7) by AS2PR07MB9491.eurprd07.prod.outlook.com (2603:10a6:20b:642::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 09:09:57 +0000 Received: from GV1PR07MB9120.eurprd07.prod.outlook.com ([fe80::a630:7019:63e4:a48a]) by GV1PR07MB9120.eurprd07.prod.outlook.com ([fe80::a630:7019:63e4:a48a%6]) with mapi id 15.20.7982.022; Tue, 24 Sep 2024 09:09:57 +0000 From: Konrad Weihmann To: bitbake-devel@lists.openembedded.org CC: Konrad Weihmann Subject: [PATCH 2/3 v3] bb/data_smart: fix override syntax warning Date: Tue, 24 Sep 2024 09:09:05 +0000 Message-ID: X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: FR0P281CA0143.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:96::17) To GV1PR07MB9120.eurprd07.prod.outlook.com (2603:10a6:150:80::7) X-Microsoft-Original-Message-ID: <20240924090905.4097-1-kweihmann@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1PR07MB9120:EE_|AS2PR07MB9491:EE_ X-MS-Office365-Filtering-Correlation-Id: fe3c1620-94ad-456b-b32e-08dcdc78a945 X-Microsoft-Antispam: BCL:0;ARA:14566002|7092599003|15080799006|5072599009|461199028|19110799003|8060799006|5062599005|3412199025|440099028|1710799026; X-Microsoft-Antispam-Message-Info: 5BF7mT9W7KUC2nS7NjAp6FUFtJpqS9rP2jtC00DmPv800QF/cYpe+8cExgMfaJbJEuc7k/jvJdV+RV2MQfyiUswI/eeJt70//mL6bfoJAMJZA6n9MK303RnLzNUwpQcKQYfrjNIZqrGOh5if/v34SicVFIDJRY5u3Ac8RmB09ivjtaCeWZ94/291QslRXVgIgvqvfvWub6uhyPrahzwJxkKSa+YPsJGoszxghyPy5fNUxci2wcMhAjFpWckryYYAOipmHXDH41CBfmRr5Qhb8OZT9bdRXW7j1vHcRO+NeVQ7/QjChSmjROAs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r6xVC8d4yrkYp2dZxdkBimV0s0VdX4NnTpZFd4I6UHNWr0RSBpZEZmLapUJdp/GfrJJW7egH/geXHKDaqWTWXe3m2mua1oHgCkT/jQyZ4QRiqb1/nkOLSIMrtgGgJkem8pnmihiDQI/LSdxdRl/hhOBpbO3j9AZ4lLrEHGhFzoOx+LXElfJyy5CR0lWHMkP9Yda6s7Wnv/H5S81dcADPYsTtprYQHCSiupaxDlFXOseEWjzmXiT7c2jnVo/jxF+2gT+PlFPJfR8I/tFs6UMIgOuvoBzIJqSrUAeSIsou3rLP/TfDYQIspp8GkPlDY16oNLEw9PdSxv56pvufmu71EcGo2VmJ23X/D8Y2LFHWafWjdjw6aPdITvKuTipTW5vx9vzrSSw16Y/lJGKcVAdy2aMldJaUxMV7wLJSpowoDxm+03NsepQVwKwr98KjIAEe/gV2qtALN9giXfF+NDBJRBjZHoBskCNz1cEj2WKK5+kPQJppp3mFxlr5stbSqgm/AbmNs6dtXzXjDmlAAtIeYdShuDxE1JSndeqGQLZ4iXySSAxBbqHtRXjo96dzQVuRU+1Emy5aDQBcmLrmd5tvuV7+gEeVSapU71VoaXP5LbnGAmHQX47zFBavie7c9WvNKat1+o4cCTeFnhhTnrNv0fkoJw8PNmd2FXRxV0AZ4b04A+xgfByk77yUh3ise2PVn4esaqnmDIkSIoahOQWDzQalXOVHTGw+Qy1IJGDX3KkrQgWy7aF0hCF6620XFBR+/eYXcfZhzFM/4PehD9jT82BRftPkb8iZRaOU= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe3c1620-94ad-456b-b32e-08dcdc78a945 X-MS-Exchange-CrossTenant-AuthSource: GV1PR07MB9120.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 09:09:57.6409 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR07MB9491 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 24 Sep 2024 09:10:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/16597 when defining a function do_removesomething, the parser warned about Variable do_removesomething contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake correct it would be to search for a override operator at the end of the string or for the next operator. To avoid running the expensive regex search on every setVar call the current "cheap" check would be have to be triggered, before the more precise check is run. Signed-off-by: Konrad Weihmann --- lib/bb/data_smart.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py index 4e15a43c2..0523744de 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -539,14 +539,14 @@ class DataSmart(MutableMapping): return var in self.overridedata def setVar(self, var, value, **loginfo): - if not var.startswith("__anon_") and ("_append" in var or "_prepend" in var or "_remove" in var): - info = "%s" % var - if "file" in loginfo: - info += " file: %s" % loginfo["file"] - if "line" in loginfo: - info += " line: %s" % loginfo["line"] - bb.fatal("Variable %s contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake." % info) + if re.search(r"(_append|_prepend|_remove)(_|$)", var) is not None: + info = "%s" % var + if "file" in loginfo: + info += " file: %s" % loginfo["file"] + if "line" in loginfo: + info += " line: %s" % loginfo["line"] + bb.fatal("Variable %s contains an operation using the old override syntax. Please convert this layer/metadata before attempting to use with a newer bitbake." % info) shortvar = var.split(":", 1)[0] if shortvar in self._var_renames: