From patchwork Wed Feb 21 19:36:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39884 X-Patchwork-Delegate: steve@sakoman.com 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 15CBAC54E42 for ; Wed, 21 Feb 2024 19:40:53 +0000 (UTC) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mx.groups.io with SMTP id smtpd.web10.455.1708544443744782814 for ; Wed, 21 Feb 2024 11:40:44 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=O362xtn9; spf=pass (domain: gmail.com, ip: 209.85.221.45, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-33d28468666so757917f8f.0 for ; Wed, 21 Feb 2024 11:40:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708544442; x=1709149242; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=19bkzy+F+oR2d8MER+I4CjV+XhDWquBlzUwA9Solcro=; b=O362xtn9FQj/m3rPkcuoxRnYoaypAf8dotY5AtRZIT6bHBxvOiQlhAJIeljqbSXM43 xdrvdkm9zgekjGHRLhU+B8k7tIVr2WJiyAVMedg2qmBKm/UcdCeNU7E6+b7tN2jNHpK9 hYHf/UQzOAxT/8OoqfPhzyn78JpZTxg+AmIiZH7an4d8dfwsVqiOfpFp/EQIo6SDv/uT DUUdAIVjcD3Dyee8rFxMBN6EUjcOK3W650/VI4rkHZzyGJnok+BCVKKwj2mi6OHPZoJq dftfNp96CGEb8hcyie/6xQ404/Uq++74xsdHtlbYGexiBNXK1tXYyeHeKv6KlLSFqK4e osRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708544442; x=1709149242; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=19bkzy+F+oR2d8MER+I4CjV+XhDWquBlzUwA9Solcro=; b=nueocbM9+0kUa4C2GqmUAA2EGTS3UnkiVqgCgeu0Zkkf21pbgdp1FYmOJg/sCp6IZj As+vMwe9101NtZE6h5ZXcCx+H9e65gX1Se3t7pKUzD3zaHU1lJWax6OKAaNb0ZkDceQn 9+rXlBSgRp6xSI0OpWAPPadnBdEPj2wrh1AJc+9inY6klZ60XvZ+UCYqPiibJapMEzuz ea66A6IV0tfwVzOIpgRIEEOGjlZuOStWOHN1RA8F0TDEOURTmSIAiZNAyoR8U8jBBhcz 9XElwVi7W3Daq/45JNsBNDugq5UdcGxJvCsrxo/GstGUu9PYW+4FVIepcgtVXvGjOIf0 T1iA== X-Gm-Message-State: AOJu0YxatNJhmJn1guVNfaMlN/YaDLmtVuo300LtEKiGw+Oq+BZfNijW xsFOxr2dJPAx5FA6ZoWzBoICMKPt3gi9ZU35wih7zcD/tH0LY44SRT9iM0Am X-Google-Smtp-Source: AGHT+IHLpN1Pc/ClwbhtC6c+JLAQAnSJwllrKZxWVlng6hvJpkbSlTy5wmCyMOMozRTQyauhhTuvvg== X-Received: by 2002:a05:6000:1f89:b0:33d:4bc3:e787 with SMTP id bw9-20020a0560001f8900b0033d4bc3e787mr8469027wrb.51.1708544441708; Wed, 21 Feb 2024 11:40:41 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id h5-20020a05600016c500b0033d60cba289sm8764686wrf.68.2024.02.21.11.40.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:40:41 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Subject: [kirkstone][PATCH v2 01/13] recipetool/create_buildsys_python: use importlib instead of imp Date: Wed, 21 Feb 2024 20:36:53 +0100 Message-ID: <20240221194036.1804463-2-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240221194036.1804463-1-adrian.freihofer@siemens.com> References: <20240221194036.1804463-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 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, 21 Feb 2024 19:40:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195985 From: Chris Laplante 'imp' was deprecated in Python 3.4 and removed in 3.12. The piece of importlib we use has been around since 3.3. Signed-off-by: Chris Laplante Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie Cherry-picked from master: 457f0dad87b4e45a53865b5ad2c150215bd74019 Signed-off-by: Adrian Freihofer --- scripts/lib/recipetool/create_buildsys_python.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py index 5686a62d3f..a7eed3256f 100644 --- a/scripts/lib/recipetool/create_buildsys_python.py +++ b/scripts/lib/recipetool/create_buildsys_python.py @@ -10,7 +10,7 @@ import codecs import collections import setuptools.command.build_py import email -import imp +import importlib import glob import itertools import logging @@ -561,7 +561,6 @@ class PythonRecipeHandler(RecipeHandler): return deps def parse_pkgdata_for_python_packages(self): - suffixes = [t[0] for t in imp.get_suffixes()] pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR') ldata = tinfoil.config_data.createCopy() @@ -585,7 +584,7 @@ class PythonRecipeHandler(RecipeHandler): continue for fn in files_info: - for suffix in suffixes: + for suffix in importlib.machinery.all_suffixes(): if fn.endswith(suffix): break else: From patchwork Wed Feb 21 19:36:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39874 X-Patchwork-Delegate: steve@sakoman.com 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 70F7CC5478A for ; Wed, 21 Feb 2024 19:40:52 +0000 (UTC) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mx.groups.io with SMTP id smtpd.web10.456.1708544444138156589 for ; Wed, 21 Feb 2024 11:40:44 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GMtB0UDr; spf=pass (domain: gmail.com, ip: 209.85.221.46, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-33d118a181fso3714639f8f.1 for ; Wed, 21 Feb 2024 11:40:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708544442; x=1709149242; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=XVL8wByLrW6dg1mHYJG3likhEODBdq7COnQlgST22uo=; b=GMtB0UDrbUgblpX7XwdBNQ3LXxsAYYS1n4LMTM0cyuYH86YfKt4Z49BSdw+Ajh7NaN bji4sTOxDwnsaKZVrD9hd+I5gOlRMfqNebWnQuUvG7DjlIB0TH+xeH1vXvPCRBy4UBvl kC4kwnFnxA+UO7u1FwqhrWCjwJkEncIRMfoD/kh34keEwcIkxBX/FEX+jAAt/9Tfk1GC yxwHl4Ll05N+myXEFI+yrh1cIFGHuI3bHH9zJSG6rEAjyfA/5ikBdQwMAO5GUajBgBSn bMkq1jHKAXLOhJkSd56HrJ8+JE8URfs1nZWQkPZsK3wGwbeMNscBbb7rTtEnZ3EgsSgr pmHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708544442; x=1709149242; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XVL8wByLrW6dg1mHYJG3likhEODBdq7COnQlgST22uo=; b=EFBc7ALTtyI5zhGdGzaxSfcHPauJNS2EjaDtrgYkJ3HLMiQWkuuWE9/VkMgg5yp0ye 7oSa9y7jyRa+IgyqORUCdjbFLXULNtnupwEItbVkpEFbOahX6rI1uKzx1LkMmw+eQvRy VM4Q0obblidTrJAHg5YfmFCn+UBkSwE6tjwdR6V7SKsoH1lAEnz5n8odHeiAamVx8CRf ap04iekXuGf8Li9l1AJ6Mli4bzibhhIO2nC/sVok0aI8TGzAYZ5iIdqz0f0/qUpriQVE ZJow4OUy0GzHlItc8HdS5SY7LQtb1Own3g3R4+HtuMd/aCEh6i1BBmBieCGaMUgRHmIc aJyQ== X-Gm-Message-State: AOJu0Yzob9J620JwZjs+Gpxiu4TZsNaac0VEsmRbSWnup6cN1lEXId3B 007COo2Qy4t/dMavfGysFr7WB/OeiluOhBKF646uFQrZ0JAkuwXt1qd5+Ele X-Google-Smtp-Source: AGHT+IHWHbolLa8ZMHyx08jTZWEGtmOXvssuf9rdrFqPQKrzWkHqXU7HEhW1/XmF7FBSofPmdZ33pw== X-Received: by 2002:a5d:4ac9:0:b0:33d:679d:a033 with SMTP id y9-20020a5d4ac9000000b0033d679da033mr3841042wrs.36.1708544442357; Wed, 21 Feb 2024 11:40:42 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id h5-20020a05600016c500b0033d60cba289sm8764686wrf.68.2024.02.21.11.40.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:40:42 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Subject: [kirkstone][PATCH v2 02/13] scripts/runqemu: fix regex escape sequences Date: Wed, 21 Feb 2024 20:36:54 +0100 Message-ID: <20240221194036.1804463-3-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240221194036.1804463-1-adrian.freihofer@siemens.com> References: <20240221194036.1804463-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 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, 21 Feb 2024 19:40:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195986 From: Trevor Gamblin When invoking runqemu with Python 3.12, the following warning is encountered: |SyntaxWarning: invalid escape sequence '\.' This is because the interpreter scans the string before it is processed by the regex module, and it interprets the backslash as part of an escape sequence, but not a standard one. This will be registered as an error rather than a warning in future Python versions. To avoid the it, simply add an extra backslash so that Python doesn't misinterpret the string, while the regex parser still sees an escaped '.' character. Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie Backported from master: 0e8a4142bb90a92d175df6b2537d24a372356f98 Signed-off-by: Adrian Freihofer --- scripts/runqemu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/runqemu b/scripts/runqemu index 729b067a9f..b7d7c7b4e7 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -362,7 +362,7 @@ class BaseConfig(object): if p.endswith('.qemuboot.conf'): self.qemuboot = p self.qbconfload = True - elif re.search('\.bin$', p) or re.search('bzImage', p) or \ + elif re.search('\\.bin$', p) or re.search('bzImage', p) or \ re.search('zImage', p) or re.search('vmlinux', p) or \ re.search('fitImage', p) or re.search('uImage', p): self.kernel = p @@ -376,13 +376,13 @@ class BaseConfig(object): fst = t break if not fst: - m = re.search('.*\.(.*)$', self.rootfs) + m = re.search('.*\\.(.*)$', self.rootfs) if m: fst = m.group(1) if fst: self.check_arg_fstype(fst) - qb = re.sub('\.' + fst + "$", '', self.rootfs) - qb = '%s%s' % (re.sub('\.rootfs$', '', qb), '.qemuboot.conf') + qb = re.sub('\\.' + fst + "$", '', self.rootfs) + qb = '%s%s' % (re.sub('\\.rootfs$', '', qb), '.qemuboot.conf') if os.path.exists(qb): self.qemuboot = qb self.qbconfload = True From patchwork Wed Feb 21 19:36:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39875 X-Patchwork-Delegate: steve@sakoman.com 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 BB1BCC5478D for ; Wed, 21 Feb 2024 19:40:52 +0000 (UTC) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.groups.io with SMTP id smtpd.web10.457.1708544444906607147 for ; Wed, 21 Feb 2024 11:40:45 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=R/vS0By/; spf=pass (domain: gmail.com, ip: 209.85.221.54, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-33d6f1f17e5so1304798f8f.3 for ; Wed, 21 Feb 2024 11:40:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708544443; x=1709149243; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4vpudt6jNN1yAEoz/e+sUy9Utg2xomIy1upS1JCnxes=; b=R/vS0By/4CCtBXDHKzUlHw/I72nfMb+1gavkWyitujku5C0voI4lw7i5logqkczbjm ONlPs1Mf515tQGaV/C3OEnOyi9zJsd9/rUOQi0jt70spVYK0oJOSI1AbdHgFDJ6Wvjm3 IGS2mk86w5+KIqTN30bWpjcOx9QDtComH2P5YMqNw+s/ZWnU4lAKOaRudt9PFzAvgBWC +5uazj2TSqKBh52daTEhhXkM1EvftPXbehrcKCh1vtQWluV/ZsB0UMsK8+dw3bfDJnGT 6FeoDBKBTvR01gm93YCX/fopQpiZg43QZ9WGbQ/7gox8m5AHRgvgZgxFr2lSxqBxxdwX 00cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708544443; x=1709149243; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4vpudt6jNN1yAEoz/e+sUy9Utg2xomIy1upS1JCnxes=; b=emQiURuFWTLfP6WUkf5IzAvtREhxRJ51UKLc4HTJkh0gGKG4PZf2Fw/t2JwixAmobQ xtVdpR0J+bARyalolapgPn8X20icvy47asVM+Fmix8DcoFcAuNvsG8y1DK7A1ntbnYC4 6DB4cG1tFq7pHvi4/HNZGIrci+S9fWEvgBC1He4N2Qe47MEl/ldd6+8eI5Qun3hCd7Kp SDaZglxNNyk8ZI/XSNEjfmwz6RiXFizAB7eKXlGLyJpnF08PvBKzIyYlyzwdNsm64uME ZE4JR3LzxdH+UVGVR9eBsWh4bjehtC6kDprb3u61kf8PuGGlPNuYaU8XYGbeaWwn9Fyj AMNg== X-Gm-Message-State: AOJu0Yz8kMtRaj8oDhynKpr5484YTUGpwV6dy8ovIfY8nJZB/fSiUSIA kDjYmACW8A33O7IP6T+ra5pc3tbUoW1WXGqQbkW+KTcIqqxXVulORV0C9UDo X-Google-Smtp-Source: AGHT+IFRVKN3HoFQMItq4cRgFEGKD7ZpjZ0bwokrI59uNwJ0slUjgHEz3aQSEPvUL1yNgqhs5lJMuA== X-Received: by 2002:a5d:5509:0:b0:33d:119c:ae8b with SMTP id b9-20020a5d5509000000b0033d119cae8bmr12328300wrv.49.1708544443184; Wed, 21 Feb 2024 11:40:43 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id h5-20020a05600016c500b0033d60cba289sm8764686wrf.68.2024.02.21.11.40.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:40:42 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Subject: [kirkstone][PATCH v2 03/13] populate_sdk_ext: use ConfigParser instead of SafeConfigParser Date: Wed, 21 Feb 2024 20:36:55 +0100 Message-ID: <20240221194036.1804463-4-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240221194036.1804463-1-adrian.freihofer@siemens.com> References: <20240221194036.1804463-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 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, 21 Feb 2024 19:40:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195987 From: Ross Burton SafeConfigParser was renamed to ConfigParser in 3.2, and the SafeConfigParser alias will be removed in 3.12. Signed-off-by: Ross Burton Signed-off-by: Alexandre Belloni Cherry-picked from master: 71b3e7f71727137b4b996cc4160c9cc1581824b8 Signed-off-by: Adrian Freihofer --- meta/classes/populate_sdk_ext.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index ca1b7753cb..bdd86863c6 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass @@ -227,7 +227,7 @@ python copy_buildsystem () { # Write out config file for devtool import configparser - config = configparser.SafeConfigParser() + config = configparser.ConfigParser() config.add_section('General') config.set('General', 'bitbake_subdir', conf_bbpath) config.set('General', 'init_path', conf_initpath) From patchwork Wed Feb 21 19:36:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39879 X-Patchwork-Delegate: steve@sakoman.com 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 CA2AEC54790 for ; Wed, 21 Feb 2024 19:40:52 +0000 (UTC) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mx.groups.io with SMTP id smtpd.web10.458.1708544445656616873 for ; Wed, 21 Feb 2024 11:40:45 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EWvO4JN4; spf=pass (domain: gmail.com, ip: 209.85.221.43, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-33d153254b7so3594708f8f.0 for ; Wed, 21 Feb 2024 11:40:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708544444; x=1709149244; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=kmL470n1WLDbhnyqzyBwLr3jSk5trh2U4t5zpynb0vw=; b=EWvO4JN4+/MjzQZI6AoTHAi0stGMkX42UzMrtY1iNGMFUagqxmHNpPEXoh9ltL/A3Y N60QytCWjtlAQ9tcAGLH5PzP6BgorQBqJGtoLUI5ppzIObUchBBCmF6jdpeAEF2o/Umx YTUL1/lD1+1TNG1qofEylfrznDgE0TCGc6CBLq+3o3FpWiwb8fJwujfnEx7ky/GcGYPg 5NEC0H+jhHEb9fmW0YrZqkO0ypgTtbgakb663G0KxorKdDXQTCs79OywTDllwvH7GB4L e4b0mJKB1xSMaxV5fkvkbQBCJXedmyMwgrGqP+JKVKUgem0UGirGPhVY33lIJ0Ixy8Ee tp4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708544444; x=1709149244; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kmL470n1WLDbhnyqzyBwLr3jSk5trh2U4t5zpynb0vw=; b=rD7KtuJOPwJfEq+LUTCPsLwM+BQ2sRe756dQVx6mbaX0eMinYYrUFlphiOPu1UPdw/ GzDpHZc3PBTxd3oQY81TV5m2JCi254Cpo5JRpiHyUz5LE+IiBcFPqDWn0s/uAlPAMQ9t 3/Lc1CUCij4CuWH6tWxQlZSh7SI9JYTGbK7jDRJHpT84uIkqw17GUt8WeGy5l1CWIMuy YrZ9GGVpXUYXh1iaVtzx7Z5knVrTRYVr21tb16vZ73xZ1f27oHhEOznlcLpUAzmqVr/N CelQk6lrUSRgbCJUpAejDlMbBqQZCzMWR6QriH9Mr7Yvfsznn3Y2911IxrOnemOcIEbv /6tQ== X-Gm-Message-State: AOJu0Yy1i9oVtwnsvuFlCzIiiXsZ+7KoCXlKn/3vo1XqxAookWBQ9RNe 0wQp4N2B1cn+4IZJNkvx6m6filMJDxXedMuBhPBGdCeToNZqYLrieFLdakMt X-Google-Smtp-Source: AGHT+IEz4MtasQt3A5+5QOcA8IYsLbkAh3f9PgPhsqNW2Fvf/k+8t+mivWXxpbPgE2WEuMVIYXI5yA== X-Received: by 2002:a5d:64c8:0:b0:33d:545b:1794 with SMTP id f8-20020a5d64c8000000b0033d545b1794mr8214199wri.9.1708544443886; Wed, 21 Feb 2024 11:40:43 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id h5-20020a05600016c500b0033d60cba289sm8764686wrf.68.2024.02.21.11.40.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:40:43 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Subject: [kirkstone][PATCH v2 04/13] runqemu: add qmp socket support Date: Wed, 21 Feb 2024 20:36:56 +0100 Message-ID: <20240221194036.1804463-5-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240221194036.1804463-1-adrian.freihofer@siemens.com> References: <20240221194036.1804463-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 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, 21 Feb 2024 19:40:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195988 From: Ross Burton Add support for qmp sockets and defaults to unix:qmp.sock if unspecified Signed-off-by: Ross Burton Signed-off-by: Eilís 'pidge' Ní Fhlannagáin Signed-off-by: Richard Purdie Backported from master: 380631797f0d63124a8c21efa93ab672dbd79283 Qemu throws many warnings without qmp and many runtime tests fail without this patch also on kirkstone. Signed-off-by: Adrian Freihofer --- scripts/runqemu | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/runqemu b/scripts/runqemu index b7d7c7b4e7..b8c5adcbec 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -82,6 +82,7 @@ of the following environment variables (in any order): kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU required) publicvnc - enable a VNC server open to all hosts audio - enable audio + qmp= - create a QMP socket (defaults to unix:qmp.sock if unspecified) [*/]ovmf* - OVMF firmware file or base name for booting with UEFI tcpserial= - specify tcp serial port number qemuparams= - specify custom parameters to QEMU @@ -216,6 +217,7 @@ class BaseConfig(object): self.cleaned = False # Files to cleanup after run self.cleanup_files = [] + self.qmp = None def acquire_taplock(self, error=True): logger.debug("Acquiring lockfile %s..." % self.taplock) @@ -526,6 +528,10 @@ class BaseConfig(object): elif arg == 'publicvnc': self.publicvnc = True self.qemu_opt_script += ' -vnc :0' + elif arg == "qmp": + self.qmp = "unix:qmp.sock" + elif arg.startswith("qmp="): + self.qmp = arg[len('qmp='):] elif arg.startswith('tcpserial='): self.tcpserial_portnum = '%s' % arg[len('tcpserial='):] elif arg.startswith('qemuparams='): @@ -1346,6 +1352,10 @@ class BaseConfig(object): raise RunQemuError("Failed to boot, QB_SYSTEM_NAME is NULL!") self.qemu_system = qemu_system + def setup_qmp(self): + if self.qmp: + self.qemu_opt += " -qmp %s,server,nowait" % self.qmp + def setup_vga(self): if self.nographic == True: if self.sdl == True: @@ -1476,6 +1486,7 @@ class BaseConfig(object): if self.snapshot: self.qemu_opt += " -snapshot" + self.setup_qmp() self.setup_serial() self.setup_vga() From patchwork Wed Feb 21 19:36:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39880 X-Patchwork-Delegate: steve@sakoman.com 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 D6A12C54792 for ; Wed, 21 Feb 2024 19:40:52 +0000 (UTC) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.web11.501.1708544446409600877 for ; Wed, 21 Feb 2024 11:40:46 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=he8olkf5; spf=pass (domain: gmail.com, ip: 209.85.128.49, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4126f486429so16341785e9.0 for ; Wed, 21 Feb 2024 11:40:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708544444; x=1709149244; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=c2KvcjsvtTy/ULDFY9UAC3JY0LBu4c6+FFcTvMn+E7I=; b=he8olkf5OYh5DX0GTReNbrZVHscZEUmJ7cFVQw8dxHgVo2mgjlpwDNkGWP0wKjtRoN 1CFjmWBYMKU7Nfvf94u7kmtxw+vXYY6/4ksa0Yee2Es607p/pKtXcpN9E9NuTamU4DQ9 ohWzd7WbchClS31hBE2OQEHy+FDpR0D4FcLrDbvQsyMvSKCM9T9GGEs8qZJXTIHEhD+Q /X/zbWqP3Bkat6igmlYJJ9S1MX3nPpZOqar0g2/7nE1/pc5/lY/R4Q4T8fJbjeIVHk15 B5vdo1+xCaItJxkVnx13QYYPzGVoYgVKz+huNK3N5KGBw3U/x9XuQ8pfWB5B0DXNhYnD TEMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708544444; x=1709149244; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c2KvcjsvtTy/ULDFY9UAC3JY0LBu4c6+FFcTvMn+E7I=; b=aoliLAbngU5rmZBUuWVmXDm4EHX4R1rwkRzWD4asWyxyOrfxQPSGkB5r3H9kcoaWru O3ID4QxmRmsifyK0FkcBRGxxYrQ1U92QoGqKsHLV0SyhsscLDrUan4bYxD0CLI0ItyvN zGekAfDOXwulTrmHXSRCANG93QP68e+Mksf0AZVA18H+nqthWXfRh1jMAIRF0dqjbbTO 24qIBuXCFA2U3wx96tyNZ/6kYfOfohFSyrTgCYHjrhtcbyrR8E/e6xlE+p95m73jbHql 5aQ5sR8iQ9VntTO2o9vwYL3I7CohwKTF0ZrgKF1af9OjuXXo4SHmJhkwcXnWIKJK0ApN 2Ymg== X-Gm-Message-State: AOJu0YyPT5zJN4i4NQ1iNhSJZASkHSj8piI7dKkQLbD1kbIuXsNyefaY zJdM7U0RTtIuoWazSox6DW2eRVxLEOZryO8l/zyyufce0G5YaOszNFTrG1JS X-Google-Smtp-Source: AGHT+IFWjs5fnIKwHfw3OTJTVNGU/TLDCXNnS9ezdP74+0Ed6IuUkztWAoS0FOopzBRMOJk17jEGtQ== X-Received: by 2002:adf:f0ce:0:b0:33d:22f4:179b with SMTP id x14-20020adff0ce000000b0033d22f4179bmr9470940wro.21.1708544444628; Wed, 21 Feb 2024 11:40:44 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id h5-20020a05600016c500b0033d60cba289sm8764686wrf.68.2024.02.21.11.40.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:40:44 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Subject: [kirkstone][PATCH v2 05/13] oeqa: replace deprecated assertEquals Date: Wed, 21 Feb 2024 20:36:57 +0100 Message-ID: <20240221194036.1804463-6-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240221194036.1804463-1-adrian.freihofer@siemens.com> References: <20240221194036.1804463-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 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, 21 Feb 2024 19:40:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195989 From: Adrian Freihofer assertEquals is deprecated since Python 2.7: https://docs.python.org/2/library/unittest.html#deprecated-aliases It throws errors at least on Python 3.12. Replace it by assertEqual. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie Backported from master: 68286d0b70cf09a0d2950b48945c9192fb8c8769 Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/sdk/buildtools-cases/sanity.py | 2 +- meta/lib/oeqa/selftest/cases/devtool.py | 2 +- meta/lib/oeqa/selftest/cases/liboe.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/lib/oeqa/sdk/buildtools-cases/sanity.py b/meta/lib/oeqa/sdk/buildtools-cases/sanity.py index 64baaa8f84..68b19f4d47 100644 --- a/meta/lib/oeqa/sdk/buildtools-cases/sanity.py +++ b/meta/lib/oeqa/sdk/buildtools-cases/sanity.py @@ -19,4 +19,4 @@ class SanityTests(OESDKTestCase): # Canonicalise the location of this command tool_path = os.path.realpath(self._run("command -v %s" % command).strip()) # Assert that the tool was found inside the SDK root - self.assertEquals(os.path.commonprefix((sdk_base, tool_path)), sdk_base) + self.assertEqual(os.path.commonprefix((sdk_base, tool_path)), sdk_base) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index aea2ad6561..dc0fc35062 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -919,7 +919,7 @@ class DevtoolModifyTests(DevtoolBase): runCmd('git -C %s checkout %s' % (tempdir, branch)) with open(source, "rt") as f: content = f.read() - self.assertEquals(content, expected) + self.assertEqual(content, expected) check('devtool', 'This is a test for something\n') check('devtool-no-overrides', 'This is a test for something\n') check('devtool-override-qemuarm', 'This is a test for qemuarm\n') diff --git a/meta/lib/oeqa/selftest/cases/liboe.py b/meta/lib/oeqa/selftest/cases/liboe.py index afe8f8809f..da88ff480e 100644 --- a/meta/lib/oeqa/selftest/cases/liboe.py +++ b/meta/lib/oeqa/selftest/cases/liboe.py @@ -97,6 +97,6 @@ class LibOE(OESelftestTestCase): dstcnt = len(os.listdir(dst)) srccnt = len(os.listdir(src)) - self.assertEquals(dstcnt, len(testfiles), "Number of files in dst (%s) differs from number of files in src(%s)." % (dstcnt, srccnt)) + self.assertEqual(dstcnt, len(testfiles), "Number of files in dst (%s) differs from number of files in src(%s)." % (dstcnt, srccnt)) oe.path.remove(testloc) From patchwork Wed Feb 21 19:36:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39881 X-Patchwork-Delegate: steve@sakoman.com 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 EDD1CC54793 for ; Wed, 21 Feb 2024 19:40:52 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.web10.461.1708544447552707206 for ; Wed, 21 Feb 2024 11:40:47 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=D8TsPfRi; spf=pass (domain: gmail.com, ip: 209.85.221.42, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-33d4c11bd34so2772077f8f.3 for ; Wed, 21 Feb 2024 11:40:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708544445; x=1709149245; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=suLHWl9GSRGMw4awROsfkgEvzIn5iBeK/oebUguDTTE=; b=D8TsPfRi+8gjs1TgUFQ0XZXDWYlxn2u1TqmyqXRRF10cvRVi93Xp+RjPck1jKZjWNc TTNTaftF+lw7vS5mihD1QGqdLWxKCnzsgQvLaGnIF2eiawZoBeb6QLUcWcSakcKcTtaG c+HtZCFnJEVyLwUmVyFVgSQd+B+2u0drxLGXM0OKEhPBZt0YpzoCcIfxRjkAOw8phyFU S3k4fMN3SmH57E+8X7Aj8P1iqMq4myQTXtblt7FTob8hSnesimCkWLhcgfVYjJPFk3WW FqC2gaFm71eNvfA7q1JPVVBpFj/R7HirPcpdBi59xSyWeROyWeMhyeSSE/tRyc+ttgX/ AFUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708544445; x=1709149245; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=suLHWl9GSRGMw4awROsfkgEvzIn5iBeK/oebUguDTTE=; b=KER1IimhFqGAMa4TBkMncSShkb1+4cf1RBONEfmzPoqBvpKjI7lx18QYjOjH0hSZqA GLmi5hh/sGveIKzxMYuUD64OFxkzPfT7/Umybev/orazfZh6eH5F4jzXwoIjoU6ByNe1 ps5Wsbn0DABoiqon9jpQbpqteKHoFED82voz/1yLCS8yElxPSmQEvdqVLSmowqEODEM6 W8eRftIWLibQ1Tgo8rvOlcNDnCDmbMQxJK2ZNddGQr1r/Cc+NTQ42Jd6RDiXTJGCNe4u Ai3gtPen06hCjgtgKyvu8OeoC10Aj06OdivKY78w7CagkHoct01DXbc7KguZTfWXvl52 eDgA== X-Gm-Message-State: AOJu0YzM4oypBeU53PiCiLy3lIzAaKP6hXp7vK3zyfWUGdrHKR/43qeV f4q4BeANcXFH1j1pp3y7ywsrvs4rolFaNDwHrwk4rxLCXoAFo61MSmADZeVT X-Google-Smtp-Source: AGHT+IF9A4sUI3z/YAAADmcJ+C+7nPXjvQhw4X0hou+/EQQVOZbuH7+anj+O7jI08WRHInVNPuPp+Q== X-Received: by 2002:a05:6000:d84:b0:33d:2a1e:99fb with SMTP id dv4-20020a0560000d8400b0033d2a1e99fbmr12299665wrb.57.1708544445554; Wed, 21 Feb 2024 11:40:45 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id h5-20020a05600016c500b0033d60cba289sm8764686wrf.68.2024.02.21.11.40.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:40:44 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Subject: [kirkstone][PATCH v2 06/13] oeqa/selftest/recipetool: fix for python 3.12 Date: Wed, 21 Feb 2024 20:36:58 +0100 Message-ID: <20240221194036.1804463-7-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240221194036.1804463-1-adrian.freihofer@siemens.com> References: <20240221194036.1804463-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 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, 21 Feb 2024 19:40:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195990 From: Adrian Freihofer test_recipetool_create_github and test_recipetool_create_github_tarball fail because the old meson version used by these tests cases does not run on Python 3.12. The issue is in the dependencies.py which comes with meson: ERROR: build/tmp/work/recipetool-3z4osyl7/source/git/mesonbuild/ dependencies.py:777: SyntaxWarning: invalid escape sequence '\.' Use meson 1.3.1 (what is currently also used on master) as a reference for these tests. With this version of meson, recipetool creates recipes named meson_git.bb or meson_1.3.1.bb. Since this looks more reasonable than e.g. python3-meson_git.bb the test gets adapted. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie Backported from master: 7374a8a2810a6cf027bfefefe87691a3529123ff Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/recipetool.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index db8790b57b..db21325155 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py @@ -444,13 +444,13 @@ class RecipetoolCreateTests(RecipetoolBase): temprecipe = os.path.join(self.tempdir, 'recipe') os.makedirs(temprecipe) recipefile = os.path.join(temprecipe, 'meson_git.bb') - srcuri = 'https://github.com/mesonbuild/meson;rev=0.32.0' + srcuri = 'https://github.com/mesonbuild/meson;rev=1.3.1' result = runCmd(['recipetool', 'create', '-o', temprecipe, srcuri]) self.assertTrue(os.path.isfile(recipefile)) checkvars = {} - checkvars['LICENSE'] = set(['Apache-2.0']) - checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https;branch=master' - inherits = ['setuptools3'] + checkvars['LICENSE'] = set(['Apache-2.0', 'Proprietary', 'Unknown']) + checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https;branch=1.3' + inherits = ['python_setuptools_build_meta'] self._test_recipe_contents(recipefile, checkvars, inherits) def test_recipetool_create_python3_setuptools(self): @@ -476,15 +476,15 @@ class RecipetoolCreateTests(RecipetoolBase): # Basic test to ensure github URL mangling doesn't apply to release tarballs temprecipe = os.path.join(self.tempdir, 'recipe') os.makedirs(temprecipe) - pv = '0.32.0' + pv = '1.3.1' recipefile = os.path.join(temprecipe, 'meson_%s.bb' % pv) srcuri = 'https://github.com/mesonbuild/meson/releases/download/%s/meson-%s.tar.gz' % (pv, pv) result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) self.assertTrue(os.path.isfile(recipefile)) checkvars = {} - checkvars['LICENSE'] = set(['Apache-2.0']) + checkvars['LICENSE'] = set(['Apache-2.0', 'Proprietary', 'Unknown']) checkvars['SRC_URI'] = 'https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz' - inherits = ['setuptools3'] + inherits = ['python_setuptools_build_meta'] self._test_recipe_contents(recipefile, checkvars, inherits) def _test_recipetool_create_git(self, srcuri, branch=None): From patchwork Wed Feb 21 19:36:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39883 X-Patchwork-Delegate: steve@sakoman.com 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 07DC2C54798 for ; Wed, 21 Feb 2024 19:40:53 +0000 (UTC) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mx.groups.io with SMTP id smtpd.web11.502.1708544447923645514 for ; Wed, 21 Feb 2024 11:40:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=M3eZx1YD; spf=pass (domain: gmail.com, ip: 209.85.221.45, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-33d18931a94so842167f8f.1 for ; Wed, 21 Feb 2024 11:40:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708544446; x=1709149246; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=takw75URpKotd/VH8XlPoU8IBBDfkdICzITwRAppyOY=; b=M3eZx1YDBjga5wYdaJr9WXVwlexaIqHyYPqt7ZJi097HN+oZXWxdzm72sUBOseg663 rejsGx7E2l6a1H0cU6sK38k0ZxWCOAa4bQHFfSpe04Uy9DtTRbdfOO34w2E9/IpMEQ1u 4uvr7kh3UJQPeAbDKr8zwP4mbuZ55PdjwjfQK6Zi58GZ5PiG4+ClIYs5Iq7oc2TMnu6B iwYEwWF3zgkuKKw0JhVBfcTj17po6/vXXqANtxpw54ZdFTSK50WzIAkKHsoS8xbob2oz edvr3Uwfx0kHbu6/vtv7O55GTCIbITWOJOudZMza/sC3AVllq878ecPw5VL75mskN7/F 7zZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708544446; x=1709149246; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=takw75URpKotd/VH8XlPoU8IBBDfkdICzITwRAppyOY=; b=vPzyGvVgEG2FO4I6eL1HCxA8hIYKEeRsvuTVDnottqDFx57/wUlFrBUpUb9NYVz9Wy txhf/JY+blWtA8xgBl4hVjyLRK+pbpeh4GdqGMfH2AieVf+iuo+vS9YNsH+IILieouM3 mhRTgWirJCNTQBRp+HrtM/gfGetosRcvYwCf0Ji8g10iym9feXqPn5HHU4EAFxvHMLEA NZ43lJY57j0VlZKXXcb87JfiqZF6OK6YIfg+4dB//ax341t+4MP/23XAbaYlqoG0aQQv gn6W/nwe9e9T/91SRYgFSDeYb3c9tXjfZmOy6s5StGK5SSaso4HtM91R3FgkyFFAGX6+ jxuA== X-Gm-Message-State: AOJu0YzRG4FttlF/MjY/J0WvKmH57q+UCmoNKztMHzPC5mXgYCwJTwiw FGy0FAcVCbdw2spqsP/lb1DlmBA4f1WKXd7m6VJx/g2MyKNajCNjRwdj/DKw X-Google-Smtp-Source: AGHT+IGzL+VXPNqJBaBBKg34rsl1QKXQfQ8ZGt3S8OmVZn0gfU4DzhMHAFnqLjKh/pAUDGdTt3/qAQ== X-Received: by 2002:a5d:540a:0:b0:33d:2f2e:ad1a with SMTP id g10-20020a5d540a000000b0033d2f2ead1amr8216646wrv.2.1708544446136; Wed, 21 Feb 2024 11:40:46 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id h5-20020a05600016c500b0033d60cba289sm8764686wrf.68.2024.02.21.11.40.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:40:45 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Subject: [kirkstone][PATCH v2 07/13] oeqa/selftest/recipetool: downgrade meson version to not use pyproject.toml Date: Wed, 21 Feb 2024 20:36:59 +0100 Message-ID: <20240221194036.1804463-8-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240221194036.1804463-1-adrian.freihofer@siemens.com> References: <20240221194036.1804463-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 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, 21 Feb 2024 19:40:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195991 From: Ross Burton recipetool's pyproject.toml parsing needs tomllib (python 3.11+) or tomli (not a hard dependency), so is prone to failing depending on the host configuration. Downgrade the Meson release used for the checks to 0.52.1, which was the last release before moving to pyproject.toml. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Backported from master: 6dfe573d83687e5431841f062442b54b9fa22ff3 Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/recipetool.py | 29 ++++++++++++---------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index db21325155..c888770533 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py @@ -440,17 +440,19 @@ class RecipetoolCreateTests(RecipetoolBase): self._test_recipe_contents(recipefile, checkvars, inherits) def test_recipetool_create_github(self): - # Basic test to see if github URL mangling works + # Basic test to see if github URL mangling works. Deliberately use an + # older release of Meson at present so we don't need a toml parser. temprecipe = os.path.join(self.tempdir, 'recipe') os.makedirs(temprecipe) - recipefile = os.path.join(temprecipe, 'meson_git.bb') - srcuri = 'https://github.com/mesonbuild/meson;rev=1.3.1' - result = runCmd(['recipetool', 'create', '-o', temprecipe, srcuri]) - self.assertTrue(os.path.isfile(recipefile)) + recipefile = os.path.join(temprecipe, 'python3-meson_git.bb') + srcuri = 'https://github.com/mesonbuild/meson;rev=0.52.1' + cmd = ['recipetool', 'create', '-o', temprecipe, srcuri] + result = runCmd(cmd) + self.assertTrue(os.path.isfile(recipefile), msg="recipe %s not created for command %s, output %s" % (recipefile, " ".join(cmd), result.output)) checkvars = {} - checkvars['LICENSE'] = set(['Apache-2.0', 'Proprietary', 'Unknown']) - checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https;branch=1.3' - inherits = ['python_setuptools_build_meta'] + checkvars['LICENSE'] = set(['Apache-2.0', "Unknown"]) + checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https;branch=0.52' + inherits = ['setuptools3'] self._test_recipe_contents(recipefile, checkvars, inherits) def test_recipetool_create_python3_setuptools(self): @@ -473,18 +475,19 @@ class RecipetoolCreateTests(RecipetoolBase): self._test_recipe_contents(recipefile, checkvars, inherits) def test_recipetool_create_github_tarball(self): - # Basic test to ensure github URL mangling doesn't apply to release tarballs + # Basic test to ensure github URL mangling doesn't apply to release tarballs. + # Deliberately use an older release of Meson at present so we don't need a toml parser. temprecipe = os.path.join(self.tempdir, 'recipe') os.makedirs(temprecipe) - pv = '1.3.1' - recipefile = os.path.join(temprecipe, 'meson_%s.bb' % pv) + pv = '0.52.1' + recipefile = os.path.join(temprecipe, 'python3-meson_%s.bb' % pv) srcuri = 'https://github.com/mesonbuild/meson/releases/download/%s/meson-%s.tar.gz' % (pv, pv) result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) self.assertTrue(os.path.isfile(recipefile)) checkvars = {} - checkvars['LICENSE'] = set(['Apache-2.0', 'Proprietary', 'Unknown']) + checkvars['LICENSE'] = set(['Apache-2.0']) checkvars['SRC_URI'] = 'https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz' - inherits = ['python_setuptools_build_meta'] + inherits = ['setuptools3'] self._test_recipe_contents(recipefile, checkvars, inherits) def _test_recipetool_create_git(self, srcuri, branch=None): From patchwork Wed Feb 21 19:37:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39882 X-Patchwork-Delegate: steve@sakoman.com 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 15AECC54E41 for ; Wed, 21 Feb 2024 19:40:53 +0000 (UTC) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.groups.io with SMTP id smtpd.web10.462.1708544448815909680 for ; Wed, 21 Feb 2024 11:40:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SC0cS5qk; spf=pass (domain: gmail.com, ip: 209.85.221.44, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-33d7b8f563eso902497f8f.0 for ; Wed, 21 Feb 2024 11:40:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708544447; x=1709149247; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/9MRkgaFGReQNmekQ4NkMssEF9zxWvW4uBB6H4vnlyE=; b=SC0cS5qk7Jozjp4yiwocfel5goP/k0Gn2HmWWa2Fsbv02kXq4xS4sUpr51Ucp6uotR YROSvbyjp2hYizp37vGDJBQvARa2Dv6FgzKO/bnOSStg1EZekYpAXS3geOppj8vkVRZr JvoaJKMmGy9obw/kamc9NKcVzCuKKaindRzQjcJZwnyvVJ9X3NtKbVhbQnLjUR6xibUO olqXNEUlHQyVBQkP9nlE+NQt6g703QNeefUF4dLKOLbYa11VipU0yFDS9LUFtv4nMw8g MHLaQHoP1xdBAceYJFa+5fT6cniWf9qtO3itcr4ePRhEILBhfhuwzbkFmYFHwk8QnRfs cMOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708544447; x=1709149247; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/9MRkgaFGReQNmekQ4NkMssEF9zxWvW4uBB6H4vnlyE=; b=tTyK4bcj/QGahV0nPEQNkWaA0YgS/EktSOcfli3EEqaEnx8g2KAlaGlZcvu4mBqfBH pP8Fb1neacUdjKyQsNVv2QNScfto+/W79Bms2STlX3Kg5JfEusLUdBN7rkJjE4lTZvj7 uxGyzVpocyOleTLgYI6I2ZsUYMylRacKGhlRZ0P13caYpW1Zj4TW3STQ7cbpTKZ0L/xm flr+fR2sRnFySvaoUjKL0knRxNkvZX6C8nlanDXfwVDPM6wh7lZteOgAZ/UUl9/aD7UY sVGfMPrAQITz4/ZnGfli0rVC17XA8HHzR5f7g9rGROwQcffhMpSn0cfiB43nHWSmmBmv vO9g== X-Gm-Message-State: AOJu0YwR+EWjYyWfvAOPa/y5dh6QCXk3wu5PFzzJ1cx8qztLv9Gy8Hsd yWil7k+4Om5mBc+yDh9NkkBz/fhYiTymNEwmnGlZFUrE8OMvGNw6zEYjKNzj X-Google-Smtp-Source: AGHT+IFl/22r8SopWu+3H/I9xp9x4jwL1HSDcE6gWs5br9KRhvSs/WH+NUMS7nuwBdH59qlNn2sVPg== X-Received: by 2002:a5d:6ac9:0:b0:33d:1993:21cd with SMTP id u9-20020a5d6ac9000000b0033d199321cdmr12367764wrw.9.1708544446953; Wed, 21 Feb 2024 11:40:46 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id h5-20020a05600016c500b0033d60cba289sm8764686wrf.68.2024.02.21.11.40.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:40:46 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Subject: [kirkstone][PATCH v2 08/13] oeqa/selftest/recipetool: expect meson.bb Date: Wed, 21 Feb 2024 20:37:00 +0100 Message-ID: <20240221194036.1804463-9-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240221194036.1804463-1-adrian.freihofer@siemens.com> References: <20240221194036.1804463-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 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, 21 Feb 2024 19:40:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195992 Latest recipetool from master branch generates a pyhton3-meson.bb recipe while the older version from kirkstone generates a meson.bb. Change the test to pass with meson.bb. Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/recipetool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index c888770533..a2d8d292ad 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py @@ -444,7 +444,7 @@ class RecipetoolCreateTests(RecipetoolBase): # older release of Meson at present so we don't need a toml parser. temprecipe = os.path.join(self.tempdir, 'recipe') os.makedirs(temprecipe) - recipefile = os.path.join(temprecipe, 'python3-meson_git.bb') + recipefile = os.path.join(temprecipe, 'meson_git.bb') srcuri = 'https://github.com/mesonbuild/meson;rev=0.52.1' cmd = ['recipetool', 'create', '-o', temprecipe, srcuri] result = runCmd(cmd) @@ -480,7 +480,7 @@ class RecipetoolCreateTests(RecipetoolBase): temprecipe = os.path.join(self.tempdir, 'recipe') os.makedirs(temprecipe) pv = '0.52.1' - recipefile = os.path.join(temprecipe, 'python3-meson_%s.bb' % pv) + recipefile = os.path.join(temprecipe, 'meson_%s.bb' % pv) srcuri = 'https://github.com/mesonbuild/meson/releases/download/%s/meson-%s.tar.gz' % (pv, pv) result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) self.assertTrue(os.path.isfile(recipefile)) From patchwork Wed Feb 21 19:37:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39876 X-Patchwork-Delegate: steve@sakoman.com 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 8B0B7C5478C for ; Wed, 21 Feb 2024 19:40:52 +0000 (UTC) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mx.groups.io with SMTP id smtpd.web10.463.1708544449740769062 for ; Wed, 21 Feb 2024 11:40:50 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nhhMISIh; spf=pass (domain: gmail.com, ip: 209.85.221.51, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3394ca0c874so3862894f8f.2 for ; Wed, 21 Feb 2024 11:40:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708544448; x=1709149248; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=J7bhVNL8gqP7pW4LkdgBGQIDdPXEh/44XiT2BOyBBtg=; b=nhhMISIhZEyjHrdTm1ghnZ4Z0yTC/LChmO/MyTBS5Df+XmRQwyAfvade+9HMVXrQ2y 6s6vu6gTal/ftdJnfkBjwY/Q7WSSAIWYBdYdrLZskhWk8v0KEpHSZ6FzwbgKrIU1a0L0 0jd2vinX0wxi8Sv/DFHXhwjuJZjt7fINqhynjIVBgvDAQluFkeTAylnKMdsZCv7Shcnz 0MPwhJt3x6yqS6o4j+9BNMo5KPSwHJqCbKYsOTnZ5ZoWdfvTqgPpZREwkzoBYTpHS8l5 u/1iinI07oOTG5ZlI6Y9sEUtzmSeDcEq8vY6SisUIB4RYt4y9/7bavF8LlgXWAhD4Z0V qF4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708544448; x=1709149248; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J7bhVNL8gqP7pW4LkdgBGQIDdPXEh/44XiT2BOyBBtg=; b=ZVqmk2dobs6HQ7PESxCzVj2gUrufZ+DxZGc8DOlF84WxKdu1ogHdmTpGpCtilMkl6m QDQo6nLtqe5jV6JmGHiACrLsN+LvRFelA0SMe4QvDY+Luk1stTw2+Lrh9MdrjZFjuHnj OHBNvb5rP/p7eJvOlvjRLg44JWv5I6yJmvHYlU25WmdOd+lAHXeHn7+TNJRhd7Or2GTn w6tKMkp+iZCgzOIEh5kULQBQoRoe150rJQSrOvF4yGkkJ7/OQC3OkGSW+G0r1T0O6exC UJgyIHubQKvmLya8Rch07+KZHQ/HadEz2hJsX7rrbf8AsW24AJUEXfRjKxi6lTrhm4Ap N8Zg== X-Gm-Message-State: AOJu0YxnDGk49Vekx+ZFpZSjq/+28FVU6JCzE++p5AQGusnt0K36Knkt kkKOHYPdEZM9oM0y4xDuY7C3jUCTmhlVdn0AUcnP29HmDrO5H0J56g63yNPr X-Google-Smtp-Source: AGHT+IHIIhAneg/2XAqF/SGr+n/Cm4KcvyDUWlRdPQ3HZ2NYJJ9QMlGCdthionWJMltmxIR9Wp524Q== X-Received: by 2002:a5d:4102:0:b0:33d:248e:5b7 with SMTP id l2-20020a5d4102000000b0033d248e05b7mr9823330wrp.28.1708544447882; Wed, 21 Feb 2024 11:40:47 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id h5-20020a05600016c500b0033d60cba289sm8764686wrf.68.2024.02.21.11.40.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:40:47 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Subject: [kirkstone][PATCH v2 09/13] oeqa/selftest/oelib/buildhistory: git default branch Date: Wed, 21 Feb 2024 20:37:01 +0100 Message-ID: <20240221194036.1804463-10-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240221194036.1804463-1-adrian.freihofer@siemens.com> References: <20240221194036.1804463-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 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, 21 Feb 2024 19:40:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195993 From: Adrian Freihofer On hosts with git defaulting to main branch the following exception occures: File .../buildhistory.py", line 99, in test_compare_dict_blobs_default blob1 = self.repo.heads.master.commit.tree.blobs[0] ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/git/util.py", line 1114, in __getattr__ return list.__getattribute__(self, attr) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'IterableList' object has no attribute 'master' Support main and master branch for these test cases. Note: setting the default branch with --initial-branch requires git version 2.28 or later. Some of the still supported host distros do not provide this feature yet. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie Cherry-picked from master: 7df99843d8f31d8e0c2872ff625f4a5abf28f740 Signed-off-by: Adrian Freihofer --- .../oeqa/selftest/cases/oelib/buildhistory.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py index 33bd6df2f3..ae12aa0865 100644 --- a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py +++ b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py @@ -28,6 +28,16 @@ class TestBlobParsing(OESelftestTestCase): import shutil shutil.rmtree(self.repo_path) + @property + def heads_default(self): + """ + Support repos defaulting to master or to main branch + """ + try: + return self.repo.heads.main + except AttributeError: + return self.repo.heads.master + def commit_vars(self, to_add={}, to_remove = [], msg="A commit message"): if len(to_add) == 0 and len(to_remove) == 0: return @@ -65,10 +75,10 @@ class TestBlobParsing(OESelftestTestCase): changesmap = { "foo-2" : ("2", "8"), "bar" : ("","4"), "bar-2" : ("","5")} self.commit_vars(to_add = { "foo" : "1", "foo-2" : "2", "foo-3" : "3" }) - blob1 = self.repo.heads.master.commit.tree.blobs[0] + blob1 = self.heads_default.commit.tree.blobs[0] self.commit_vars(to_add = { "foo-2" : "8", "bar" : "4", "bar-2" : "5" }) - blob2 = self.repo.heads.master.commit.tree.blobs[0] + blob2 = self.heads_default.commit.tree.blobs[0] change_records = compare_dict_blobs(os.path.join(self.repo_path, self.test_file), blob1, blob2, False, False) @@ -84,10 +94,10 @@ class TestBlobParsing(OESelftestTestCase): defaultmap = { x : ("default", "1") for x in ["PKG", "PKGE", "PKGV", "PKGR"]} self.commit_vars(to_add = { "foo" : "1" }) - blob1 = self.repo.heads.master.commit.tree.blobs[0] + blob1 = self.heads_default.commit.tree.blobs[0] self.commit_vars(to_add = { "PKG" : "1", "PKGE" : "1", "PKGV" : "1", "PKGR" : "1" }) - blob2 = self.repo.heads.master.commit.tree.blobs[0] + blob2 = self.heads_default.commit.tree.blobs[0] change_records = compare_dict_blobs(os.path.join(self.repo_path, self.test_file), blob1, blob2, False, False) From patchwork Wed Feb 21 19:37:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39877 X-Patchwork-Delegate: steve@sakoman.com 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 7C970C5478B for ; Wed, 21 Feb 2024 19:40:52 +0000 (UTC) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.groups.io with SMTP id smtpd.web10.464.1708544450443263429 for ; Wed, 21 Feb 2024 11:40:50 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jz415+th; spf=pass (domain: gmail.com, ip: 209.85.221.44, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-33d6bd39470so506680f8f.3 for ; Wed, 21 Feb 2024 11:40:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708544449; x=1709149249; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Y8tfzimZjDkoqv1DWfEruJTtwJF+/ErC9UenZzjdzZk=; b=jz415+th13kLqVCgEf1xGlGbSLT4V69OjVKmg16WW226sSVXj+uPiU8v3Ji3drVSy3 dGuMCcbC0UeYbhIrWC+qKpMsW88gHthqSYwTU3e70WiIv7tNsLhoKqAymPUpL1aW9DUr zlc3RdTDCXKcBLkDmjgg0vjx37krdOEp+rhhCry+ZBlaHRFha422xTKJQBNOzoSBmt3y lgwNRM/vpsU9i/z4PHd8O5XYB2Du0mpZgA+eXmYRRiLVtCZ5zaT/VLZ5ySU4wwVtk015 Rg5yzydUnBAb9G4NhVYF+0/k5ay0o+tOmyvkou/uT2wp2Xr0fgTzYO26e0TmHSkeU6+2 cT1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708544449; x=1709149249; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y8tfzimZjDkoqv1DWfEruJTtwJF+/ErC9UenZzjdzZk=; b=SHeZRB1FcetLWAOe9KRfNV4ZMoaETX6pvoV55LZDJ3XZHsF2mG2eXrTwJJ5VnEcZN4 F7jGGbM7hOqSKNrxsWw8MrIypGDgB4DXcaaFFgrzP1kDCNAQP2QWUnOBOiB4oSkJgVLJ WXFEK/G+iMxgBGb/gZCIfHadrDPPPpdPDBmX2NGsRIgt5alWFuET9io8HVv0M3jebsd0 euB1NwQyds3CGBDIiUQApC7bvWX6Hucah+gBBzh5oYc/BbgA3/fQKTBLJZm3CRkn2dKm tRS0hnlrq5+Eq25341vx1cYQnFI49sPQvIqvNQQoTXbZYGgnSMX/sQuug4H0/9xcjrPb 2OJg== X-Gm-Message-State: AOJu0Yxa6EPqsAl8PimGvM6gsoi4ZYKfsF5JaSJ3GQAsE38TtGNHXtkZ UxJypofz3jno4RK5CO12Ok24orl6Z+ksScaqTWjHbhbo2WBfqAX9rIZGb+pY X-Google-Smtp-Source: AGHT+IEC8fH73CE6GS5CASxRVPHaofL+VWOBl9J9PHN1ia/MMeCQzMyWCaAfoJ+8hjOjQ0/HTuVqDw== X-Received: by 2002:a5d:630c:0:b0:33d:6ac0:bf0c with SMTP id i12-20020a5d630c000000b0033d6ac0bf0cmr3901892wru.48.1708544448675; Wed, 21 Feb 2024 11:40:48 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id h5-20020a05600016c500b0033d60cba289sm8764686wrf.68.2024.02.21.11.40.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:40:48 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Subject: [kirkstone][PATCH v2 10/13] feature-microblaze-versions.inc: python 3.12 regex Date: Wed, 21 Feb 2024 20:37:02 +0100 Message-ID: <20240221194036.1804463-11-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240221194036.1804463-1-adrian.freihofer@siemens.com> References: <20240221194036.1804463-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 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, 21 Feb 2024 19:40:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195994 From: Adrian Freihofer Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer feature-microblaze-versions.inc# Signed-off-by: Richard Purdie Cherry-picked from master: 662f52f1713c9f070550fc0c874eb62312218ea4 Signed-off-by: Adrian Freihofer --- .../machine/include/microblaze/feature-microblaze-versions.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc b/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc index 5c37f49abb..658e87b8cd 100644 --- a/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc +++ b/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc @@ -16,7 +16,7 @@ def microblaze_current_version(d, gcc = False): # find the current version, and convert it to major/minor integers version = None for t in (d.getVar("TUNE_FEATURES") or "").split(): - m = re.search("^v(\d+)\.(\d+)", t) + m = re.search(r"^v(\d+)\.(\d+)", t) if m: version = int(m.group(1)), int(m.group(2)) break From patchwork Wed Feb 21 19:37:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39878 X-Patchwork-Delegate: steve@sakoman.com 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 BB23AC54791 for ; Wed, 21 Feb 2024 19:40:52 +0000 (UTC) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mx.groups.io with SMTP id smtpd.web11.506.1708544451303112473 for ; Wed, 21 Feb 2024 11:40:51 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gi6wpUpn; spf=pass (domain: gmail.com, ip: 209.85.221.43, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-33d18931a94so842252f8f.1 for ; Wed, 21 Feb 2024 11:40:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708544449; x=1709149249; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=oL5bbV6PegO7Hw/DFKm3cHodje+2IMFbVortKt1eA+Y=; b=gi6wpUpns1b44wUS3jN/XcMLDWZ4Lct8c67wlPUdCDGDQrA5LuorBxx+cv8s41id5P DcSi3L3gkJhjNcky1WsGql71rKCClWB8juAW+vTkxiK5Vc+pioAolQqQ4XPQ5tUVJ71M gKxVyW2Hm3g42QPlq3qiGuViMwK9LCe0ldzFtnmX7NySDEEUDeFE6u9dONSMbocxlhdn 5HPQQ+YM6iam4E8ihyPWZfX43VZDoNb0pm5dOQBduynlXX7z6zJ1fl1Df4ODmx6/aJJk Qn/KgpZI0Z+x6ncoRZD9vYekk+mk404i+hAhzjXEOBT4hoiD07qnXc/88L2DucibYnCW KjoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708544449; x=1709149249; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oL5bbV6PegO7Hw/DFKm3cHodje+2IMFbVortKt1eA+Y=; b=aKykfo1YCzjLo9nzoomAkXvy8dg8t15mOXhfZOD4GWAu0V8n6R0pTeCuAmdDCCEBlc eBGSNN/dctNq+g/K9eXGIg2oQ0ZugB2LkCdYewTbJwjgISvYJXNaZEjtgIDcdjP0ge9M CNxNlds7RND0VdghKseZWuWn6MbcTP9dzLJRilEF7E9SmyKV0z/OOGcMJgHCQfbwc6DG +y4OmJCNtFCqD8wn7iitR6vj35ePXMAWoqxk6h2bsiYKB/mkqHssqaWgdXhuTFJGrMOt 5v1XuuNqxqqmcbTKbKZSyv7A4sVivHTwXo7/X1XByQhMvQrhfJH4UAs/lPTaT06b8p/1 ZRsg== X-Gm-Message-State: AOJu0Yw5ravuzRcofjciaziIjYkfFJNfIXLduxBKPCjSAleoBfApMLEK UwYbVvnDEHsKwp4nXEFsGANVuYtZYhr4Yt44AhRdIqhrUGIn/0yL+e3+HBSt X-Google-Smtp-Source: AGHT+IFD4dzUlz0YOWsvT9TyffBQ/bk1KKeAH6PVdgIpK5Ch4rW+8g87iAeMo/vSks+Tzl3wAAS5Sg== X-Received: by 2002:adf:e74a:0:b0:33d:6984:3f80 with SMTP id c10-20020adfe74a000000b0033d69843f80mr3949218wrn.67.1708544449520; Wed, 21 Feb 2024 11:40:49 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id h5-20020a05600016c500b0033d60cba289sm8764686wrf.68.2024.02.21.11.40.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:40:49 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Subject: [kirkstone][PATCH v2 11/13] meta/lib/oeqa: python 3.12 regex Date: Wed, 21 Feb 2024 20:37:03 +0100 Message-ID: <20240221194036.1804463-12-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240221194036.1804463-1-adrian.freihofer@siemens.com> References: <20240221194036.1804463-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 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, 21 Feb 2024 19:40:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195995 From: Adrian Freihofer Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie Cherry-picked from master: 9002850f0c2e409d3bc629e36bb360b96326bb64 Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/oetest.py | 2 +- meta/lib/oeqa/selftest/cases/bblayers.py | 2 +- meta/lib/oeqa/selftest/cases/fitimage.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index 9c84466dd0..b53c611062 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py @@ -256,7 +256,7 @@ class TestContext(object): modules = [] for test in self.testslist: - if re.search("\w+\.\w+\.test_\S+", test): + if re.search(r"\w+\.\w+\.test_\S+", test): test = '.'.join(t.split('.')[:3]) module = pkgutil.get_loader(test) modules.append(module) diff --git a/meta/lib/oeqa/selftest/cases/bblayers.py b/meta/lib/oeqa/selftest/cases/bblayers.py index 7d74833f61..0b9f16eeae 100644 --- a/meta/lib/oeqa/selftest/cases/bblayers.py +++ b/meta/lib/oeqa/selftest/cases/bblayers.py @@ -46,7 +46,7 @@ class BitbakeLayers(OESelftestTestCase): bb_file = os.path.join(testoutdir, recipe_path, recipe_file) self.assertTrue(os.path.isfile(bb_file), msg = "Cannot find xcursor-transparent-theme_0.1.1.bb in the test_bitbakelayers_flatten local dir.") contents = ftools.read_file(bb_file) - find_in_contents = re.search("##### bbappended from meta-selftest #####\n(.*\n)*include test_recipe.inc", contents) + find_in_contents = re.search(r"##### bbappended from meta-selftest #####\n(.*\n)*include test_recipe.inc", contents) self.assertTrue(find_in_contents, msg = "Flattening layers did not work. bitbake-layers flatten output: %s" % result.output) def test_bitbakelayers_add_remove(self): diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py index d732a9020d..4d820faf92 100644 --- a/meta/lib/oeqa/selftest/cases/fitimage.py +++ b/meta/lib/oeqa/selftest/cases/fitimage.py @@ -202,7 +202,7 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart comment'" signed_sections = {} for line in result.output.splitlines(): if line.startswith((' Configuration', ' Image')): - in_signed = re.search('\((.*)\)', line).groups()[0] + in_signed = re.search(r'\((.*)\)', line).groups()[0] elif re.match('^ *', line) in (' ', ''): in_signed = None elif in_signed: @@ -521,7 +521,7 @@ UBOOT_FIT_HASH_ALG = "sha256" signed_sections = {} for line in result.output.splitlines(): if line.startswith((' Image')): - in_signed = re.search('\((.*)\)', line).groups()[0] + in_signed = re.search(r'\((.*)\)', line).groups()[0] elif re.match(' \w', line): in_signed = None elif in_signed: @@ -675,7 +675,7 @@ FIT_SIGN_INDIVIDUAL = "1" signed_sections = {} for line in result.output.splitlines(): if line.startswith((' Image')): - in_signed = re.search('\((.*)\)', line).groups()[0] + in_signed = re.search(r'\((.*)\)', line).groups()[0] elif re.match(' \w', line): in_signed = None elif in_signed: From patchwork Wed Feb 21 19:37:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39885 X-Patchwork-Delegate: steve@sakoman.com 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 23A34C54E49 for ; Wed, 21 Feb 2024 19:40:53 +0000 (UTC) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mx.groups.io with SMTP id smtpd.web11.507.1708544452019752930 for ; Wed, 21 Feb 2024 11:40:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FbB5UX19; spf=pass (domain: gmail.com, ip: 209.85.128.44, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4127855308bso6106425e9.3 for ; Wed, 21 Feb 2024 11:40:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708544450; x=1709149250; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Gz+Ij36rz0RUxKYzdXcOPNd9A/cwq/xRSzZzA3m5oG8=; b=FbB5UX19Nc7+SRlALcK6EtUVXBsXZXnwNm1XXdE/6O+OIy7+zS7+gyg2v4mQpsR2O0 xacG/57p1bxOYoJsJzvK9j6Oa8wJONyW/yT93z2v+MLJ6dnaMxz2ZPhUlrVNsGoEJvgt pobc7h6GZc7vkS2yzWorJ8CFNeK2RsZZLqMwfqHRMTIvumX9Ed2qbS9NwpRAAnCDcsdS Z3A31IiiXH+fxyKgyapLyRb1iFyA51N4C2zv2wAH+CBs6ZCzBSxP5zF6PDXZqx9HZcHw efyqDVnUk0IGk0S3U/2MNgt7Y++opD4Fm5FYFtDq5jcfpZvLmM39TI7BgSty9+h9LCzA lGDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708544450; x=1709149250; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gz+Ij36rz0RUxKYzdXcOPNd9A/cwq/xRSzZzA3m5oG8=; b=jfoZRyPKDQKLS/q5OZoWT/9oFd8LN7si+RAbAxSpakvTN2BneRmuIIQgkpI21FWRq3 Nq66T8HjU6JcyJc6K5RDa/ps6d3O9IqhrYGGMH6RKhZLZcoR8rzH3VBi51oKMLqQqEP0 EVzLQ1wLZZH8jUdA+FNvWuqt225e4etatIxxMbYue3VpU7mls8IjaVn7/kO7aMczXDFn mw40QJOISY9m+BaahVlkBZ+CTXp6b7VZvp6Pbm8gjAc9ufws4NnGXq+Re7Rq5CrZMKLe hedv7SuV7YIuVn2aHR+9lbTA2CYooySHIdbQHTv0suW2X3CmUVhTKeFAkBiVzDvHESbK dOCg== X-Gm-Message-State: AOJu0Yx4f82wOid+fkdcMWXJbzXv3kZC4nPGCToTlh5ChohLLUSZ5hJ6 g1QCZ49OuDwrQIPNcHR/kbyCLYjZLPrU5jzfc3G3w03IE+HKNuokjbOg2oRd X-Google-Smtp-Source: AGHT+IGFzhUbR/+2D74EKQrs0z/hcPyDyPZXJ+0B0KgattR3GgMiv/coJzwS6ojZyvGTLyZt6uP7FQ== X-Received: by 2002:a05:6000:184f:b0:33d:31dc:c109 with SMTP id c15-20020a056000184f00b0033d31dcc109mr10201931wri.50.1708544450258; Wed, 21 Feb 2024 11:40:50 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id h5-20020a05600016c500b0033d60cba289sm8764686wrf.68.2024.02.21.11.40.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:40:49 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Subject: [kirkstone][PATCH v2 12/13] meta/recipes: python 3.12 regex Date: Wed, 21 Feb 2024 20:37:04 +0100 Message-ID: <20240221194036.1804463-13-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240221194036.1804463-1-adrian.freihofer@siemens.com> References: <20240221194036.1804463-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 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, 21 Feb 2024 19:40:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195996 From: Adrian Freihofer Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie Cherry-picked from master: f2d80817baea298b953d6e14daad65087b3b50c9 Signed-off-by: Adrian Freihofer --- meta/recipes-kernel/perf/perf/sort-pmuevents.py | 8 ++++---- meta/recipes-rt/rt-tests/files/rt_bmark.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/recipes-kernel/perf/perf/sort-pmuevents.py b/meta/recipes-kernel/perf/perf/sort-pmuevents.py index 0362f2d8fa..0a87e553ab 100755 --- a/meta/recipes-kernel/perf/perf/sort-pmuevents.py +++ b/meta/recipes-kernel/perf/perf/sort-pmuevents.py @@ -36,10 +36,10 @@ with open(infile, 'r') as file: preamble_regex = re.compile( '^(.*?)^(struct|const struct|static struct|static const struct)', re.MULTILINE | re.DOTALL ) preamble = re.search( preamble_regex, data ) -struct_block_regex = re.compile( '^(struct|const struct|static struct|static const struct).*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL ) -field_regex = re.compile( '{.*?},', re.MULTILINE | re.DOTALL ) -cpuid_regex = re.compile( '\.cpuid = (.*?),', re.MULTILINE | re.DOTALL ) -name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL ) +struct_block_regex = re.compile(r'^(struct|const struct|static struct|static const struct).*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL ) +field_regex = re.compile(r'{.*?},', re.MULTILINE | re.DOTALL ) +cpuid_regex = re.compile(r'\.cpuid = (.*?),', re.MULTILINE | re.DOTALL ) +name_regex = re.compile(r'\.name = (.*?),', re.MULTILINE | re.DOTALL ) # create a dictionary structure to store all the structs, their # types and then their fields. diff --git a/meta/recipes-rt/rt-tests/files/rt_bmark.py b/meta/recipes-rt/rt-tests/files/rt_bmark.py index 3b84447a0f..2a4eed412f 100755 --- a/meta/recipes-rt/rt-tests/files/rt_bmark.py +++ b/meta/recipes-rt/rt-tests/files/rt_bmark.py @@ -265,7 +265,7 @@ cmd = ("cyclictest", "-d", str(interval_delta), "-l", str(loop_count) ) -rex = re.compile(b"C:\s*(\d+).*Min:\s*(\d+).*Avg:\s*(\d+).*Max:\s*(\d+)") +rex = re.compile(r"C:\s*(\d+).*Min:\s*(\d+).*Avg:\s*(\d+).*Max:\s*(\d+)") def run_cyclictest_once(): res = subprocess.check_output(cmd) From patchwork Wed Feb 21 19:37:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39886 X-Patchwork-Delegate: steve@sakoman.com 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 1C5D2C5478C for ; Wed, 21 Feb 2024 19:41:03 +0000 (UTC) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mx.groups.io with SMTP id smtpd.web11.508.1708544453330333799 for ; Wed, 21 Feb 2024 11:40:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ONGAzZDB; spf=pass (domain: gmail.com, ip: 209.85.128.44, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-41273f53c71so8841315e9.1 for ; Wed, 21 Feb 2024 11:40:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708544451; x=1709149251; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bnHzgdDL0C2drrzxvWf0kw/Wh2Kzz4ueFuoBnaXVK60=; b=ONGAzZDBaHav81QEMX1LVjkokByuwuPtmA17YWnFc3rJ6iuPo73byd7X1l786u2TMu UYqEnwGjqpySGoSE8IjoeqflrfmDwlPUIbGVeW8zbjP5hONcB6+PisrPjoQI0hmZ5rdh gyVOyuPb37zlPW9m0sXHb21KolqTHu6UNdRrXA6kY924pNcjp1Tw8bGqyyl+dZzwJBe2 /R+ErWOdgQvk9WPRamZSKE+qt6QTOe9dx9D3D2Pa7J3Jln2M1PEn3WKaCqwoVQ7TjJ4s NmlLt+eFKMP6gPL43Lp9cK7AY5Zeb3LKvbEppOKW8U01TG4ilFuDnyh5SY5Ql9vDWPPa jpCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708544451; x=1709149251; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bnHzgdDL0C2drrzxvWf0kw/Wh2Kzz4ueFuoBnaXVK60=; b=b6qS81GgW7M6/bEmNu4ZXfgEwjZR/dLxc4Xaee8cHfZyvLkwqWAf4ChCa+wHil51t4 1lkWJvUmIZOFkmVx51INL53oGHrmxhULrrYCTRB/BoZwdmr5QBvJpbyfDuqWOhuXfKMa 1+hQ1ZipZGFOt4XMnMKSxyO1D4i8zZKyCsydNSKxBp/eDUBmXNK85Ssf6M5M0SUhmapn CWTB33rF3GSxSL1mMhQ/SOMq36Fi1iczuly0kHSkrP1mt01pNQZ4ElciO+6Fjcf9eko/ a3HTek40mCadXU9rC26Ud419I9pswdk9P28iubcz48Z6GfB3ggtffla4Yqe0ydO1YRB5 yhVA== X-Gm-Message-State: AOJu0YxgXyOcdp7qu7W1/wwqfbxISy4l69yE9d9WgRke6OXQ7buhYeu2 yvmZaM8V0BgEGgFL3VKf2G/eLujTBDUo7V3vKbGXChWfjhbYYUiXbP75zFTV X-Google-Smtp-Source: AGHT+IGMkuWDZ/pc+a0l2i1/gh/27rYzCFSq6vZ4pAd+VSrrCeqNOZOHmam95lqg6TqzRJQyTsWJKQ== X-Received: by 2002:a05:600c:4f83:b0:411:ddc2:28b2 with SMTP id n3-20020a05600c4f8300b00411ddc228b2mr17616184wmq.27.1708544451281; Wed, 21 Feb 2024 11:40:51 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id h5-20020a05600016c500b0033d60cba289sm8764686wrf.68.2024.02.21.11.40.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 11:40:50 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Subject: [kirkstone][PATCH v2 13/13] scripts: python 3.12 regex Date: Wed, 21 Feb 2024 20:37:05 +0100 Message-ID: <20240221194036.1804463-14-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240221194036.1804463-1-adrian.freihofer@siemens.com> References: <20240221194036.1804463-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 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, 21 Feb 2024 19:41:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195997 From: Adrian Freihofer All the regexes throw a warning like this: WARNING: scripts/lib/recipetool/create_buildsys.py:140: SyntaxWarning: invalid escape sequence '\s' proj_re = re.compile('project\s*\(([^)]*)\)', re.IGNORECASE) Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie Backported from master: 24b0ba00d4f0b4d9834f7693ecb6032dfc534a80 Signed-off-by: Adrian Freihofer --- scripts/combo-layer | 2 +- scripts/contrib/bbvars.py | 6 ++-- scripts/contrib/convert-overrides.py | 8 ++--- scripts/lib/checklayer/__init__.py | 4 +-- scripts/lib/recipetool/create.py | 12 +++---- scripts/lib/recipetool/create_buildsys.py | 38 +++++++++++------------ scripts/oe-check-sstate | 2 +- scripts/oe-pkgdata-util | 2 +- scripts/opkg-query-helper.py | 2 +- 9 files changed, 38 insertions(+), 38 deletions(-) diff --git a/scripts/combo-layer b/scripts/combo-layer index 7f2020fca7..19ad32660d 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer @@ -483,7 +483,7 @@ def check_repo_clean(repodir): exit if repo is dirty """ output=runcmd("git status --porcelain", repodir) - r = re.compile('\?\? patch-.*/') + r = re.compile(r'\?\? patch-.*/') dirtyout = [item for item in output.splitlines() if not r.match(item)] if dirtyout: logger.error("git repo %s is dirty, please fix it first", repodir) diff --git a/scripts/contrib/bbvars.py b/scripts/contrib/bbvars.py index 090133600b..a9cdf082ab 100755 --- a/scripts/contrib/bbvars.py +++ b/scripts/contrib/bbvars.py @@ -36,8 +36,8 @@ def bbvar_is_documented(var, documented_vars): def collect_documented_vars(docfiles): ''' Walk the docfiles and collect the documented variables ''' documented_vars = [] - prog = re.compile(".*($|[^A-Z_])') + prog = re.compile(r".*($|[^A-Z_])') for d in docfiles: with open(d) as f: documented_vars += var_prog.findall(f.read()) @@ -45,7 +45,7 @@ def collect_documented_vars(docfiles): return documented_vars def bbvar_doctag(var, docconf): - prog = re.compile('^%s\[doc\] *= *"(.*)"' % (var)) + prog = re.compile(r'^%s\[doc\] *= *"(.*)"' % (var)) if docconf == "": return "?" diff --git a/scripts/contrib/convert-overrides.py b/scripts/contrib/convert-overrides.py index 1939757f1b..c69acb4095 100755 --- a/scripts/contrib/convert-overrides.py +++ b/scripts/contrib/convert-overrides.py @@ -81,19 +81,19 @@ skip_ext = [".html", ".patch", ".m4", ".diff"] + args.skip_ext vars_re = {} for exp in vars: - vars_re[exp] = (re.compile('((^|[#\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp), r"\1:" + exp) + vars_re[exp] = (re.compile(r'((^|[#\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp), r"\1:" + exp) shortvars_re = {} for exp in shortvars: - shortvars_re[exp] = (re.compile('((^|[#\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp + '([\(\'"\s:])'), r"\1:" + exp + r"\3") + shortvars_re[exp] = (re.compile(r'((^|[#\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp + r'([\(\'"\s:])'), r"\1:" + exp + r"\3") package_re = {} for exp in packagevars: - package_re[exp] = (re.compile('(^|[#\'"\s\-\+]+)' + exp + '_' + '([$a-z"\'\s%\[<{\\\*].)'), r"\1" + exp + r":\2") + package_re[exp] = (re.compile(r'(^|[#\'"\s\-\+]+)' + exp + r'_' + r'([$a-z"\'\s%\[<{\\\*].)'), r"\1" + exp + r":\2") # Other substitutions to make subs = { - 'r = re.compile("([^:]+):\s*(.*)")' : 'r = re.compile("(^.+?):\s+(.*)")', + 'r = re.compile(r"([^:]+):\s*(.*)")' : 'r = re.compile(r"(^.+?):\s+(.*)")', "val = d.getVar('%s_%s' % (var, pkg))" : "val = d.getVar('%s:%s' % (var, pkg))", "f.write('%s_%s: %s\\n' % (var, pkg, encode(val)))" : "f.write('%s:%s: %s\\n' % (var, pkg, encode(val)))", "d.getVar('%s_%s' % (scriptlet_name, pkg))" : "d.getVar('%s:%s' % (scriptlet_name, pkg))", diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py index 938805289e..53f99dce1e 100644 --- a/scripts/lib/checklayer/__init__.py +++ b/scripts/lib/checklayer/__init__.py @@ -324,8 +324,8 @@ def get_signatures(builddir, failsafe=False, machine=None, extravars=None): else: raise - sig_regex = re.compile("^(?P.*:.*):(?P.*) .$") - tune_regex = re.compile("(^|\s)SIGGEN_LOCKEDSIGS_t-(?P\S*)\s*=\s*") + sig_regex = re.compile(r"^(?P.*:.*):(?P.*) .$") + tune_regex = re.compile(r"(^|\s)SIGGEN_LOCKEDSIGS_t-(?P\S*)\s*=\s*") current_tune = None with open(sigs_file, 'r') as f: for line in f.readlines(): diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 67894fb4d0..7b4c501456 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py @@ -1073,12 +1073,12 @@ def crunch_license(licfile): # Note: these are carefully constructed! license_title_re = re.compile(r'^#*\(? *(This is )?([Tt]he )?.{0,15} ?[Ll]icen[sc]e( \(.{1,10}\))?\)?[:\.]? ?#*$') license_statement_re = re.compile(r'^((This (project|software)|.{1,10}) is( free software)? (released|licen[sc]ed)|(Released|Licen[cs]ed)) under the .{1,10} [Ll]icen[sc]e:?$') - copyright_re = re.compile('^ *[#\*]* *(Modified work |MIT LICENSED )?Copyright ?(\([cC]\))? .*$') - disclaimer_re = re.compile('^ *\*? ?All [Rr]ights [Rr]eserved\.$') - email_re = re.compile('^.*<[\w\.-]*@[\w\.\-]*>$') - header_re = re.compile('^(\/\**!?)? ?[\-=\*]* ?(\*\/)?$') - tag_re = re.compile('^ *@?\(?([Ll]icense|MIT)\)?$') - url_re = re.compile('^ *[#\*]* *https?:\/\/[\w\.\/\-]+$') + copyright_re = re.compile(r'^ *[#\*]* *(Modified work |MIT LICENSED )?Copyright ?(\([cC]\))? .*$') + disclaimer_re = re.compile(r'^ *\*? ?All [Rr]ights [Rr]eserved\.$') + email_re = re.compile(r'^.*<[\w\.-]*@[\w\.\-]*>$') + header_re = re.compile(r'^(\/\**!?)? ?[\-=\*]* ?(\*\/)?$') + tag_re = re.compile(r'^ *@?\(?([Ll]icense|MIT)\)?$') + url_re = re.compile(r'^ *[#\*]* *https?:\/\/[\w\.\/\-]+$') crunched_md5sums = {} diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py index 5015634476..bc4fb14a20 100644 --- a/scripts/lib/recipetool/create_buildsys.py +++ b/scripts/lib/recipetool/create_buildsys.py @@ -137,15 +137,15 @@ class CmakeRecipeHandler(RecipeHandler): deps = [] unmappedpkgs = [] - proj_re = re.compile('project\s*\(([^)]*)\)', re.IGNORECASE) - pkgcm_re = re.compile('pkg_check_modules\s*\(\s*[a-zA-Z0-9-_]+\s*(REQUIRED)?\s+([^)\s]+)\s*\)', re.IGNORECASE) - pkgsm_re = re.compile('pkg_search_module\s*\(\s*[a-zA-Z0-9-_]+\s*(REQUIRED)?((\s+[^)\s]+)+)\s*\)', re.IGNORECASE) - findpackage_re = re.compile('find_package\s*\(\s*([a-zA-Z0-9-_]+)\s*.*', re.IGNORECASE) - findlibrary_re = re.compile('find_library\s*\(\s*[a-zA-Z0-9-_]+\s*(NAMES\s+)?([a-zA-Z0-9-_ ]+)\s*.*') - checklib_re = re.compile('check_library_exists\s*\(\s*([^\s)]+)\s*.*', re.IGNORECASE) - include_re = re.compile('include\s*\(\s*([^)\s]*)\s*\)', re.IGNORECASE) - subdir_re = re.compile('add_subdirectory\s*\(\s*([^)\s]*)\s*([^)\s]*)\s*\)', re.IGNORECASE) - dep_re = re.compile('([^ ><=]+)( *[<>=]+ *[^ ><=]+)?') + proj_re = re.compile(r'project\s*\(([^)]*)\)', re.IGNORECASE) + pkgcm_re = re.compile(r'pkg_check_modules\s*\(\s*[a-zA-Z0-9-_]+\s*(REQUIRED)?\s+([^)\s]+)\s*\)', re.IGNORECASE) + pkgsm_re = re.compile(r'pkg_search_module\s*\(\s*[a-zA-Z0-9-_]+\s*(REQUIRED)?((\s+[^)\s]+)+)\s*\)', re.IGNORECASE) + findpackage_re = re.compile(r'find_package\s*\(\s*([a-zA-Z0-9-_]+)\s*.*', re.IGNORECASE) + findlibrary_re = re.compile(r'find_library\s*\(\s*[a-zA-Z0-9-_]+\s*(NAMES\s+)?([a-zA-Z0-9-_ ]+)\s*.*') + checklib_re = re.compile(r'check_library_exists\s*\(\s*([^\s)]+)\s*.*', re.IGNORECASE) + include_re = re.compile(r'include\s*\(\s*([^)\s]*)\s*\)', re.IGNORECASE) + subdir_re = re.compile(r'add_subdirectory\s*\(\s*([^)\s]*)\s*([^)\s]*)\s*\)', re.IGNORECASE) + dep_re = re.compile(r'([^ ><=]+)( *[<>=]+ *[^ ><=]+)?') def find_cmake_package(pkg): RecipeHandler.load_devel_filemap(tinfoil.config_data) @@ -423,16 +423,16 @@ class AutotoolsRecipeHandler(RecipeHandler): 'makeinfo': 'texinfo', } - pkg_re = re.compile('PKG_CHECK_MODULES\(\s*\[?[a-zA-Z0-9_]*\]?,\s*\[?([^,\]]*)\]?[),].*') - pkgce_re = re.compile('PKG_CHECK_EXISTS\(\s*\[?([^,\]]*)\]?[),].*') - lib_re = re.compile('AC_CHECK_LIB\(\s*\[?([^,\]]*)\]?,.*') - libx_re = re.compile('AX_CHECK_LIBRARY\(\s*\[?[^,\]]*\]?,\s*\[?([^,\]]*)\]?,\s*\[?([a-zA-Z0-9-]*)\]?,.*') - progs_re = re.compile('_PROGS?\(\s*\[?[a-zA-Z0-9_]*\]?,\s*\[?([^,\]]*)\]?[),].*') - dep_re = re.compile('([^ ><=]+)( [<>=]+ [^ ><=]+)?') - ac_init_re = re.compile('AC_INIT\(\s*([^,]+),\s*([^,]+)[,)].*') - am_init_re = re.compile('AM_INIT_AUTOMAKE\(\s*([^,]+),\s*([^,]+)[,)].*') - define_re = re.compile('\s*(m4_)?define\(\s*([^,]+),\s*([^,]+)\)') - version_re = re.compile('([0-9.]+)') + pkg_re = re.compile(r'PKG_CHECK_MODULES\(\s*\[?[a-zA-Z0-9_]*\]?,\s*\[?([^,\]]*)\]?[),].*') + pkgce_re = re.compile(r'PKG_CHECK_EXISTS\(\s*\[?([^,\]]*)\]?[),].*') + lib_re = re.compile(r'AC_CHECK_LIB\(\s*\[?([^,\]]*)\]?,.*') + libx_re = re.compile(r'AX_CHECK_LIBRARY\(\s*\[?[^,\]]*\]?,\s*\[?([^,\]]*)\]?,\s*\[?([a-zA-Z0-9-]*)\]?,.*') + progs_re = re.compile(r'_PROGS?\(\s*\[?[a-zA-Z0-9_]*\]?,\s*\[?([^,\]]*)\]?[),].*') + dep_re = re.compile(r'([^ ><=]+)( [<>=]+ [^ ><=]+)?') + ac_init_re = re.compile(r'AC_INIT\(\s*([^,]+),\s*([^,]+)[,)].*') + am_init_re = re.compile(r'AM_INIT_AUTOMAKE\(\s*([^,]+),\s*([^,]+)[,)].*') + define_re = re.compile(r'\s*(m4_)?define\(\s*([^,]+),\s*([^,]+)\)') + version_re = re.compile(r'([0-9.]+)') defines = {} def subst_defines(value): diff --git a/scripts/oe-check-sstate b/scripts/oe-check-sstate index 4187e77458..0d171c4463 100755 --- a/scripts/oe-check-sstate +++ b/scripts/oe-check-sstate @@ -53,7 +53,7 @@ def check(args): cmd = ['bitbake', '--dry-run', '--runall=build'] + args.target output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, env=env) - task_re = re.compile('NOTE: Running setscene task [0-9]+ of [0-9]+ \(([^)]+)\)') + task_re = re.compile(r'NOTE: Running setscene task [0-9]+ of [0-9]+ \(([^)]+)\)') tasks = [] for line in output.decode('utf-8').splitlines(): res = task_re.match(line) diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util index 7412cc1f47..44ae40549a 100755 --- a/scripts/oe-pkgdata-util +++ b/scripts/oe-pkgdata-util @@ -296,7 +296,7 @@ def package_info(args): extra = '' for line in f: for var in vars: - m = re.match(var + '(?::\S+)?:\s*(.+?)\s*$', line) + m = re.match(var + r'(?::\S+)?:\s*(.+?)\s*$', line) if m: vals[var] = m.group(1) pkg_version = vals['PKGV'] or '' diff --git a/scripts/opkg-query-helper.py b/scripts/opkg-query-helper.py index bc3ab43823..084d9ef684 100755 --- a/scripts/opkg-query-helper.py +++ b/scripts/opkg-query-helper.py @@ -29,7 +29,7 @@ for arg in sys.argv[1:]: args.append(arg) # Regex for removing version specs after dependency items -verregex = re.compile(' \([=<>]* [^ )]*\)') +verregex = re.compile(r' \([=<>]* [^ )]*\)') pkg = "" ver = ""