From patchwork Thu Feb 8 08:27:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39037 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 34247C4829A for ; Thu, 8 Feb 2024 08:29:05 +0000 (UTC) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by mx.groups.io with SMTP id smtpd.web10.13375.1707380936630993524 for ; Thu, 08 Feb 2024 00:28:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WVn+gbs7; spf=pass (domain: gmail.com, ip: 209.85.167.49, mailfrom: adrian.freihofer@gmail.com) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-51165a488baso2018372e87.2 for ; Thu, 08 Feb 2024 00:28:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707380934; x=1707985734; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tQRVH+Ey23BXzentbuJ7HBJ/PdHcjLU5edldLKQa5r0=; b=WVn+gbs7mvkJMkrK2ThcppVBoi1yo5yHD3rixl5jhk2yoBaJavpt7cT2hngZzdlb6L tyd2Dsi3xtsmKpYmWeL7nAEfm/b0Mf4Jea4oDP1AQZ1wfaglKxOhWG0tsOKAZ2hMU6S+ PXS4timbATmoxsjRfWlwHKwvRC/WZY1olfLupWIWolO//6sY4WHBEscAubf1hrffaXGZ XxTRBGiTNNREcjsWpVl68ws0Pczu/IBDsfTPkIZ8m6MOTMfwYLC1ooOK1ZbFRI+0iZW8 YArHfGZ6RgxUX71TO9Mo1BLbNzcUdnsZA7tHB7SXvwcwxPFqyWxRc8QM+TqVWPBjH768 MmTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707380934; x=1707985734; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tQRVH+Ey23BXzentbuJ7HBJ/PdHcjLU5edldLKQa5r0=; b=NnRvaLaI0CyPyNkThf9huRS6wN6JCa9yr1BCNG1dJy8VAfuDFuJguUxHg/Q2DhWYDr YDb8OB+RV1Iif6lp0bKTVqUnvcX1nLEOcZryrdwThHi6JI4pd1pzBw/ho6ecYl37Wcpz fSUHPN1y1bI9rDUDZAYXVm4ywhqwJo7VkzljJ53C93uhiEguGTs6QNm0NEzdlZvmphzf oq0S90Bvfg5qlZHdQXdeQtiMFFVeqzJRxdbDrKkl+2SazwQAP2F26D072yMyVBe0Yzfr sSbQ+rCy8nZQCUjTfhVyZXSFPralFxdkezEo06x7ivZMzenp9c52EnfknmBGf7QB6mcL 5hLQ== X-Gm-Message-State: AOJu0Ywq3/2xqgiDJJGPeNl5eDqQsgNVUHQlTh9eV4MsEeGF332Cdcob rQ7ZiY1f1xA4vscR6aPXrcF2+ZxqezIQRRgxhnx1dWXTlYIw7ia8v7MV5E8Y X-Google-Smtp-Source: AGHT+IE8vrTcJONg/OQ/sjv3b6KuD59muLL0JWErI/Xn1u34lCosgl7ehA9n3O7EyJJ7ktSGm5O9nw== X-Received: by 2002:a19:6515:0:b0:511:4a1f:ea74 with SMTP id z21-20020a196515000000b005114a1fea74mr5135741lfb.0.1707380934501; Thu, 08 Feb 2024 00:28:54 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id j12-20020a05600c190c00b0040ebf603a89sm913321wmq.11.2024.02.08.00.28.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 00:28:54 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 1/7] recipetool: cleanup imports Date: Thu, 8 Feb 2024 09:27:27 +0100 Message-ID: <20240208082821.430510-2-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240208082821.430510-1-adrian.freihofer@siemens.com> References: <20240208082821.430510-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 ; Thu, 08 Feb 2024 08:29:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195106 - os is missing - glob is not used Signed-off-by: Adrian Freihofer --- scripts/lib/recipetool/create_buildsys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py index 5015634476a..d4b194f5679 100644 --- a/scripts/lib/recipetool/create_buildsys.py +++ b/scripts/lib/recipetool/create_buildsys.py @@ -5,9 +5,9 @@ # SPDX-License-Identifier: GPL-2.0-only # +import os import re import logging -import glob from recipetool.create import RecipeHandler, validate_pv logger = logging.getLogger('recipetool') From patchwork Thu Feb 8 08:27:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39038 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 4FDB7C4829F for ; Thu, 8 Feb 2024 08:29:05 +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.web10.13376.1707380937316518291 for ; Thu, 08 Feb 2024 00:28:57 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bTIuYbbP; 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-40fb3b5893eso12255835e9.0 for ; Thu, 08 Feb 2024 00:28:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707380935; x=1707985735; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ioniT5sAo1c/jtO6Xo0crHkJGkB25nmvFiMk9hL5J/Y=; b=bTIuYbbPO7JujihOJXPQecULVbF+L5DCOovtWUlLY2oSSn4FZjwJAoh0j1nZfrk5Va YAPilK26/RC3FQRVJDumYRs0EfJpO2mt+WE7RqTGo2KYA8ulwdK4WyfEywQLAPdWFCLv hBAHNhDUu4SZ6KTRKsTYNXIbdXDC8ZU+mVKCLUSYrlSx/gWKO3wtHYibUgRSyD191Vfn lPo6GuqgxH7Vixz6PmI10E9Iqq1A+C0jF8fDBTPoPkTIVGWn/CNvMQSA+2FJNdeqqaQg Xki+keQQFnidLxQblEVwhODCJmWG1/g2KKoUru6uC9T59NgPIXsucVd+QVi//Kx1w1sx q8eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707380935; x=1707985735; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ioniT5sAo1c/jtO6Xo0crHkJGkB25nmvFiMk9hL5J/Y=; b=U3MP2cZsqqQOWNJM0Efcx4Oa9y7jde/vRRilhe54b0wu53poW4qJ/D7B6gU9cFb5Pz BscdRDz6s+Lx8Axyr2V/mDatOamPmkuJDqfOD3fXLhDFvE/3kaUC12DzTbB0v91pa0p+ wVf1F0rPnR6NlXReTMU21Wq1CMILeFO/O5S1TIrg+lUhhuGVypX+/7CTC8IcpPK+7V48 iViNAH0CtQPEz1C7qVizeiMB1DVvGekogyJ/KYwbc/HcdGtRcVDn+Ky6ck7ZXXbjJZ3B kdfQKr0ahOuWmjtjh5WnQ7UiWYHttWO2U4mY5UADIKBd/3k9vUl1bJRKm1XzYndoetEu 8ITw== X-Gm-Message-State: AOJu0Ywbv+fSTDSdF0qpn7IaBfmjLppMd+MEhzugGx/vzaxvCOeVLRAl 8M5yEkTmS3rBskLPWXVQjEMkaNl/zotfw4DjZzUpuSP66F/eMkKRpcFrDOFx X-Google-Smtp-Source: AGHT+IECHcm6Yh8tx5d+3ZoExvLnrDEKKbleT6fSiN0bZLCvlXOBbg3t0Mc6hySddPDqjwlAu/ioXg== X-Received: by 2002:a05:600c:314d:b0:40e:60c3:c327 with SMTP id h13-20020a05600c314d00b0040e60c3c327mr6174969wmo.1.1707380935282; Thu, 08 Feb 2024 00:28:55 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id j12-20020a05600c190c00b0040ebf603a89sm913321wmq.11.2024.02.08.00.28.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 00:28:54 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 2/7] oeqa: replace deprecated assertEquals Date: Thu, 8 Feb 2024 09:27:28 +0100 Message-ID: <20240208082821.430510-3-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240208082821.430510-1-adrian.freihofer@siemens.com> References: <20240208082821.430510-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 ; Thu, 08 Feb 2024 08:29:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195107 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 --- 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 b9dfa39a061..a55d456656e 100644 --- a/meta/lib/oeqa/sdk/buildtools-cases/sanity.py +++ b/meta/lib/oeqa/sdk/buildtools-cases/sanity.py @@ -21,4 +21,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 15249b70fdd..dd3a5e9b5c3 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -1097,7 +1097,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) if self.td["MACHINE"] == "qemux86": check('devtool', 'This is a test for qemux86\n') elif self.td["MACHINE"] == "qemuarm": diff --git a/meta/lib/oeqa/selftest/cases/liboe.py b/meta/lib/oeqa/selftest/cases/liboe.py index fab69291981..d5ffffdcb41 100644 --- a/meta/lib/oeqa/selftest/cases/liboe.py +++ b/meta/lib/oeqa/selftest/cases/liboe.py @@ -99,6 +99,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 Thu Feb 8 08:27:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39041 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 4FE03C48BC1 for ; Thu, 8 Feb 2024 08:29:05 +0000 (UTC) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.groups.io with SMTP id smtpd.web11.13543.1707380937714382466 for ; Thu, 08 Feb 2024 00:28:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=b7iudeIv; spf=pass (domain: gmail.com, ip: 209.85.128.42, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-410219f18f9so8257135e9.1 for ; Thu, 08 Feb 2024 00:28:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707380936; x=1707985736; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z2mYxW0kZcfYPQT96gsUycGldYhtDPiRemUUrl+zBhE=; b=b7iudeIvKSIisZCkpc2RhQ2t3/ZzjddxVw6KzaIl7POOCY/5s2N2o66/EvuZEY93Mw +UJD4mJGk9fJYp7JJWooTX3/mc0ugesMdaIEhjE1qrASNlGBNBBbw5ZfDauqPrL9Wkra IdY9qXLmQZHuk2Dq/tSTG34vpzu5vRG03Y/uuGsodmwxtwOtbNmwyK+LhrNecWAyemXf hPJZX8lGVF9FJ6m1gNKLGwy8eSD9ZsXty7SNkLqCJAKElKbZ5KX2FqM8ltPkEWD0EP2N 0ocDw0XFJPOd9fjh2z7wJB4MEth8B4LO7N8t3pzYBlfqTksGnrHmmYdBcp3GuyZDwYJM L7Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707380936; x=1707985736; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z2mYxW0kZcfYPQT96gsUycGldYhtDPiRemUUrl+zBhE=; b=kq/9S/3YwvpaYvywOG2/fiwS1OWqg3rzZHeyobRlcuBJ6uUggKMtYaxtgg7X0qw9dw /NIACVdWoDfyOHNb1StY0icXGFGbBYXE5tqGeLyUo3mgjn4DRFcYHTjXg73+SsgEAEKD G8W074Vu3vqC41WXDJbLvfNxDP9VFXhCV9HQJZOwZU7BJnqePUNKEx5tfKFTdcZBX13z GH0RX8OqDG0nar/Bc5u48Q2xby4iWBN8tHGKrhRCGnS9UjiTpLi2IHfqgh9LVjcIhgrM nYcKRDaoR3SkVfxrAP77qEdZk7YaFbtjafk8jiM0kZGUvSDbbvo3cVAFRrUE+HIPRV1o geMA== X-Gm-Message-State: AOJu0Yz2vdyJH5bNlPzTme8S5+qjD4kdRMA4kjAH/WJxkK49K4oXLTB5 ppG+6h75nsOxfKdL9RasXUQllL9mw0vftggmpfg6dXt9p+eUEJR8sYB/nuNP X-Google-Smtp-Source: AGHT+IGtzxpWUueihKahysu/IiosFDAWGCZ54sJ0vymiRH9SYb+5UeC4gcsgTf0qPIBIlhc/uv1B/w== X-Received: by 2002:a05:600c:3b03:b0:410:2b60:930d with SMTP id m3-20020a05600c3b0300b004102b60930dmr1578395wms.30.1707380935922; Thu, 08 Feb 2024 00:28:55 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id j12-20020a05600c190c00b0040ebf603a89sm913321wmq.11.2024.02.08.00.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 00:28:55 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 3/7] selftest: replace assertRaisesRegexp Date: Thu, 8 Feb 2024 09:27:29 +0100 Message-ID: <20240208082821.430510-4-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240208082821.430510-1-adrian.freihofer@siemens.com> References: <20240208082821.430510-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 ; Thu, 08 Feb 2024 08:29:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195108 assertRaisesRegexp has been renamed to assertRaisesRegex(). assertRaisesRegexp is deprecated since version 3.2: https://docs.python.org/3.2/library/unittest.html#deprecated-aliases Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/runcmd.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/runcmd.py b/meta/lib/oeqa/selftest/cases/runcmd.py index 6fd96b84850..65f7ffa4968 100644 --- a/meta/lib/oeqa/selftest/cases/runcmd.py +++ b/meta/lib/oeqa/selftest/cases/runcmd.py @@ -58,12 +58,12 @@ class RunCmdTests(OESelftestTestCase): self.assertEqual(result.status, 0) def test_result_assertion(self): - self.assertRaisesRegexp(AssertionError, "Command 'echo .* false' returned non-zero exit status 1:\nfoobar", - runCmd, "echo foobar >&2; false", shell=True) + self.assertRaisesRegex(AssertionError, "Command 'echo .* false' returned non-zero exit status 1:\nfoobar", + runCmd, "echo foobar >&2; false", shell=True) def test_result_exception(self): - self.assertRaisesRegexp(CommandError, "Command 'echo .* false' returned non-zero exit status 1 with output: foobar", - runCmd, "echo foobar >&2; false", shell=True, assert_error=False) + self.assertRaisesRegex(CommandError, "Command 'echo .* false' returned non-zero exit status 1 with output: foobar", + runCmd, "echo foobar >&2; false", shell=True, assert_error=False) def test_output(self): result = runCmd("echo stdout; echo stderr >&2", shell=True, sync=False) From patchwork Thu Feb 8 08:27:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39040 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 5B828C48BC0 for ; Thu, 8 Feb 2024 08:29:05 +0000 (UTC) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mx.groups.io with SMTP id smtpd.web10.13377.1707380938581574137 for ; Thu, 08 Feb 2024 00:28:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lbAxbuk+; spf=pass (domain: gmail.com, ip: 209.85.128.52, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4101d4c5772so3449575e9.0 for ; Thu, 08 Feb 2024 00:28:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707380937; x=1707985737; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yvyDOOSP/lWOMWhJXJdFeYOuuWd14pv1eA6T0A74dnU=; b=lbAxbuk+wnFmGMI/Cn4UV64rXbqmBxBMBoujeEHKIrTE4ng2MT3ShHG/5Jpry4IX6q Wtz3q+Vuf+MnsPN2S+ueuV96XUqGFOk27SspyHrou6UqXFdZZETicpDLd9lvSEsiDf5w EZ18mcOVeTVqZu65a6aDjd6F1MMh2jjtKP/o3DlJv7q/WpCwsvp2mAr6UJyuaBc2nsQb sdVpDGpt7+zWE8E2TM6y3oowvVkcy3AZ6YuhpqOYpqsLf67p1FcNZ1x5brzYodOM1jg6 EdDhD/o3dq+aLK5JsfZVhiBh+yU0aB1WgZ1vUpg0kYD9ssVHqv/9PuNVEyRVNJ39Gvkl qtmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707380937; x=1707985737; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yvyDOOSP/lWOMWhJXJdFeYOuuWd14pv1eA6T0A74dnU=; b=sxgEGTKpwhh70fmh5JYD5icUmimzNtBPnY2428vA7RDcVJmMcYFbwW4h5zRa7g3Uv4 rnZHTxe1HDofY6S+Z5r1/c7KaMlDSOzDJYzcIvZ0q+0L4BN5SOy4mf7DjczSuP0qnf1L DOWAuNKNvq/OUkzyZlxKJn8F+0Zg6kaXeochmMUYBM+/Ysli4fn2E7sgzb8I8ja1raAy cqcLgg6l4Z/5MkiLds+28IsBYNUk2HuN2qMwaL2uW7AxEOTvUx6SEDYeTDHIdknBb6fq m+E0RXp/VHyTXkXM3G3V0WD+y9nzBqxC+oFTtKbse536KlXQGVKlBCFKJSW1wuCB/RQr h2IQ== X-Gm-Message-State: AOJu0YwJIKYiPdxUT9g0H7eADFopBi/wZUOwnlPujO2N6OFs05LBf7k3 k6/vgZXl5hBEl5Pu16ccY1QI76oxK8YrCeQaduAH+IHfM/dDWUd0RoHIDqn6 X-Google-Smtp-Source: AGHT+IHjCgB6mt1+zazrHGNDvKNwUd7hVpWbcLhgSQ4ve/SOJFsbVmpO3l+lVdWG7u/vvVz+xt7m7Q== X-Received: by 2002:a05:600c:4e91:b0:40f:fd74:9893 with SMTP id f17-20020a05600c4e9100b0040ffd749893mr1378891wmq.5.1707380936703; Thu, 08 Feb 2024 00:28:56 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id j12-20020a05600c190c00b0040ebf603a89sm913321wmq.11.2024.02.08.00.28.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 00:28:56 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 4/7] oeqa/selftest/oelib/buildhistory: git default branch Date: Thu, 8 Feb 2024 09:27:30 +0100 Message-ID: <20240208082821.430510-5-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240208082821.430510-1-adrian.freihofer@siemens.com> References: <20240208082821.430510-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 ; Thu, 08 Feb 2024 08:29:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195109 Define the git default branch to main and use it for all test cases. This is also in line with what the build history does in practice with newer Git versions. Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/oelib/buildhistory.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py index c3c15d83c0f..762c0d47bff 100644 --- a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py +++ b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py @@ -19,7 +19,7 @@ class TestBlobParsing(OESelftestTestCase): try: from git import Repo - self.repo = Repo.init(self.repo_path) + self.repo = Repo.init(self.repo_path, initial_branch='main') except ImportError as e: self.skipTest('Python module GitPython is not present (%s) (%s)' % (e, sys.path)) @@ -67,10 +67,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.repo.heads.main.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.repo.heads.main.commit.tree.blobs[0] change_records = compare_dict_blobs(os.path.join(self.repo_path, self.test_file), blob1, blob2, False, False) @@ -86,10 +86,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.repo.heads.main.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.repo.heads.main.commit.tree.blobs[0] change_records = compare_dict_blobs(os.path.join(self.repo_path, self.test_file), blob1, blob2, False, False) From patchwork Thu Feb 8 08:27:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39042 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 68BA8C48BC4 for ; Thu, 8 Feb 2024 08:29:05 +0000 (UTC) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mx.groups.io with SMTP id smtpd.web11.13545.1707380939458433207 for ; Thu, 08 Feb 2024 00:28:59 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bNqUDwTe; spf=pass (domain: gmail.com, ip: 209.85.128.51, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-41047386c8dso446535e9.0 for ; Thu, 08 Feb 2024 00:28:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707380938; x=1707985738; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZW8o2yC/ZC2yZRT5vLU5turIhrA8VlXAtpFNwccmdaU=; b=bNqUDwTeAGOebKWTRc3K2HoO9Sq6LDHoUMURugHvtUzF8V+2FqMDR154hLHcTkE1kk /s+dJ4tNn3Smxe/moIYlJUodhnVdRM8n6DL7fjLiQVPPUMkcMud1scLgiWvNDY781Cyp Gm3X62ApD9JuJPmiD76crhW32BhTpme88y24cJW1I9y142hQJnfsMPExs9IM3OuyP/uq vnqsQpnCotHxsd2KdG59jUDCc5Sh600ZgK3JJUjXymyqarJzYHFrJo4AC/WvYMrLL6TD wnwFzf6Ch4R3t7l9gLJZF0LNv0RaQFZcR2u1SwvdfXCF2PYyQemQ1I9zTr4G5kBJu9u+ jH5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707380938; x=1707985738; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZW8o2yC/ZC2yZRT5vLU5turIhrA8VlXAtpFNwccmdaU=; b=Q4c3IAYSHHq40SA/DO/Vvc9KxdlXmxV6Vrow0yA48hF/XQWpjdvykWtXS5+hNmigpW jI7TWiXOCtl87cx55pt1EcMN04ogNKfnlXJLh2xOmtBujuU0Ap8gr8F7tnDqyJs4U+ZN 4FFMeF8WtY8FfnAFejFGB/O61ruUpJMaIZpSSIgTXkJVa/fchg8SP0vNsfYlhf2F8VSA FYMau4JaZsn4YlUY8Msicl5PR3oXiEubuyhgbwEbtVJFJ7s9hf1TeoG3EluvixrJy4b8 oZBnCH/cV4204oc8Hu2XGuRBFoIvPno1CLLsVPWSYOeBUpgRSQsIxcV24sgQHtekKKYP 6ejQ== X-Gm-Message-State: AOJu0YwWDnOXY0n9SyBekIVbCaUr57rVog9u/IAlO0cOS9XqNxx+FvGu f6Mtz3YKet1/utE+wg1jGLgFZQx4hUxxqGLZ5wjQD7OJi7k4YcwUr0kO6YXX X-Google-Smtp-Source: AGHT+IGtFnGb7kU456el6w2gY7Yf6Ec66BV9esK8JWi6akEb9PPtrpxcjA6iUjbbO6g1qq3ecsoQvQ== X-Received: by 2002:a05:600c:4614:b0:40f:dd79:b758 with SMTP id m20-20020a05600c461400b0040fdd79b758mr5601115wmo.40.1707380937665; Thu, 08 Feb 2024 00:28:57 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id j12-20020a05600c190c00b0040ebf603a89sm913321wmq.11.2024.02.08.00.28.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 00:28:57 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 5/7] oeqa/selftest/runtime_test: allow GPLv3 for bash Date: Thu, 8 Feb 2024 09:27:31 +0100 Message-ID: <20240208082821.430510-6-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240208082821.430510-1-adrian.freihofer@siemens.com> References: <20240208082821.430510-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 ; Thu, 08 Feb 2024 08:29:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195110 Test cases failed with: ERROR: core-image-full-cmdline-1.0-r0 do_rootfs: Package bash cannot be installed into the image because it has incompatible license(s): GPL-3.0-or-later Allow GPLv3 for these tests. Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/runtime_test.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py index 12000aac16e..4277c98a39c 100644 --- a/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py @@ -124,6 +124,8 @@ class TestImage(OESelftestTestCase): features = 'IMAGE_CLASSES += "testimage"\n' features += 'IMAGE_INSTALL:append = " libssl"\n' features += 'TEST_SUITES = "ping ssh selftest"\n' + # core-image-full-cmdline needs bash which is GPL-3.0-or-later. + features += 'INCOMPATIBLE_LICENSE:pn-core-image-full-cmdline = ""\n' self.write_config(features) bitbake('core-image-full-cmdline socat') @@ -175,6 +177,8 @@ TEST_RUNQEMUPARAMS += " slirp" features += 'PACKAGE_FEED_GPG_PASSPHRASE_FILE = "%s"\n' % os.path.join(signing_key_dir, 'key.passphrase') features += 'GPG_PATH = "%s"\n' % self.gpg_home features += 'PSEUDO_IGNORE_PATHS .= ",%s"\n' % self.gpg_home + # core-image-full-cmdline needs bash which is GPL-3.0-or-later. + features += 'INCOMPATIBLE_LICENSE:pn-core-image-full-cmdline = ""\n' self.write_config(features) bitbake('core-image-full-cmdline socat') @@ -212,6 +216,8 @@ TEST_RUNQEMUPARAMS += " slirp" features += 'PACKAGE_FEED_GPG_PASSPHRASE_FILE = "%s"\n' % os.path.join(signing_key_dir, 'key.passphrase') features += 'GPG_PATH = "%s"\n' % self.gpg_home features += 'PSEUDO_IGNORE_PATHS .= ",%s"\n' % self.gpg_home + # core-image-full-cmdline needs bash which is GPL-3.0-or-later. + features += 'INCOMPATIBLE_LICENSE:pn-core-image-full-cmdline = ""\n' self.write_config(features) # Build core-image-sato and testimage From patchwork Thu Feb 8 08:27:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39039 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 26C96C4828F for ; Thu, 8 Feb 2024 08:29:05 +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.web10.13378.1707380940388178187 for ; Thu, 08 Feb 2024 00:29:00 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=axS931K4; 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-41008ab427fso14124085e9.0 for ; Thu, 08 Feb 2024 00:29:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707380938; x=1707985738; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oe9Z2U9DcvcflSlZeeEhTxcjSjvzGiiNoR1nokMzKrI=; b=axS931K4Dx0rmeNta9qRhq+CKFiOYAwd4OI6h4EvPmLOMUvxzz8Dt7FBjeDm6Q87KC 7fE4kYoHhNEcevRkbVV8Bh8jJGZL16QlVlkkhkWmKDKXZo6nJkNTwiU9hNqAxIDyt417 BGW+2ehH6iBjaKHl7droHo+Eq5h8Gq9SPaYA/IY85m/CRB7gkozWhnJUD3yWdAgzGk/A VTIDAwXOmyqorJBOFoC6fQ2sL2sxK+l49kcypzppa3aA/XhqAKJZHfYtmXJMdAdGswcW 1wnp9M7kqHYgW3ysYMcJC9D2/St92o2bjiof4qYfjHs3tkhGPNVCSwcEIlXkHh3aD1tP 9eyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707380938; x=1707985738; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oe9Z2U9DcvcflSlZeeEhTxcjSjvzGiiNoR1nokMzKrI=; b=CJOaub87D438eaHpR51fyEF1cjwD8CzYVzvBT6WSXYS31Tc8IxDQIrGPndh8UvU2uS Faquu5i8Bhab9EbgPtWeQuCwJ3vclqpl/3OlShANnNMyF8y1U5lnrL0Vvl1UZj2X38eT 1krpR85cPKdrUaNWBo6esAz5GMVsbINTBce/b0hEEHhPF6340wKERm86E6eFMuNl6DCZ Fqvn3aGQzCVfegRcvBa3mzE8V8FEL5YUrr0yrSmTc2g8lamyBs2xr8WdOygHDFYQRkqo LCiNaGPzrLILnHEgaNiP99h3nJ78HkOJ8eMwKdbROMjVkcBTBHrKcymSE/JVSQKNDJNB flWw== X-Gm-Message-State: AOJu0YzcCnCZFpiRgefsswc7jXBnV9B5fxUBW1Uyi+g7UU1vXkJC5OJk rvsek8xLsUXeFfq4YS+XJxKNJiX5K84xmpmA/QLPS8qDJ0bW5PqKakZyuLv2 X-Google-Smtp-Source: AGHT+IHGKvaEsxdBmWgnl82UwZHGYLfArcQybiZMk6jCJT5JX1ozKDYgHCtt31fpnGf+Hc6gX7hOJQ== X-Received: by 2002:a05:600c:3581:b0:40f:de6a:2a27 with SMTP id p1-20020a05600c358100b0040fde6a2a27mr5730648wmq.40.1707380938422; Thu, 08 Feb 2024 00:28:58 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id j12-20020a05600c190c00b0040ebf603a89sm913321wmq.11.2024.02.08.00.28.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 00:28:58 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 6/7] oeqa/selftest/recipetool: fix for python 3.12 Date: Thu, 8 Feb 2024 09:27:32 +0100 Message-ID: <20240208082821.430510-7-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240208082821.430510-1-adrian.freihofer@siemens.com> References: <20240208082821.430510-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 ; Thu, 08 Feb 2024 08:29:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195111 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 --- meta/lib/oeqa/selftest/cases/recipetool.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index 0c296875b23..39114c67622 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py @@ -444,14 +444,14 @@ class RecipetoolCreateTests(RecipetoolBase): # Basic test to see if github URL mangling works temprecipe = os.path.join(self.tempdir, 'recipe') os.makedirs(temprecipe) - recipefile = os.path.join(temprecipe, 'python3-meson_git.bb') - srcuri = 'https://github.com/mesonbuild/meson;rev=0.32.0' + 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)) 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): @@ -703,15 +703,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' - recipefile = os.path.join(temprecipe, 'python3-meson_%s.bb' % pv) + 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 Thu Feb 8 08:27:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39036 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 27A10C4829E for ; Thu, 8 Feb 2024 08:29:05 +0000 (UTC) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mx.groups.io with SMTP id smtpd.web10.13379.1707380941007005368 for ; Thu, 08 Feb 2024 00:29:01 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZzNNE1ca; spf=pass (domain: gmail.com, ip: 209.85.128.48, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4100826df08so13415555e9.2 for ; Thu, 08 Feb 2024 00:29:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707380939; x=1707985739; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=M3sjBnf8Hy5ZDNmJrihKEvkaMGcLVSOU8cTsOu0RMDw=; b=ZzNNE1cai8cdzrW/YjTwcdHb4JFO/sq64FBWim1zV1xBg+0KzXGRSU7VoXTrleG0kA fSSu4mkKfsYakINaz+AvjYruDuRGDQJ7UyjUw9/M8W3CzWQV3448C9rd0ZRkWMTKRq6n Bfy9sFDriMd26mDAiDIP2o+5lW6FpLN7Pp6rKdyMtvi4ot0/H2q9Lzyw9QHGilmL4hZ0 evbQrVnS3pfKHAoMKz5fZLwe+En7JxHr7TxeB7LEIWUPW2Q58AyPA7EiqTL2RBV5XKiH MFxm7ZlM3FSZG6CeFashobo/uqaW//o1pDljZ2PgUboYb0xkCMPpqdOOJXvvDF/rCI5q 7Y/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707380939; x=1707985739; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M3sjBnf8Hy5ZDNmJrihKEvkaMGcLVSOU8cTsOu0RMDw=; b=RaQ74F5a0qGytTZe73RPvfMajeW2/Y1lCfXV6fr/XMsl5TtJfhhXWMnVxjwa3MmpvJ iUxUWIio+fnGTjMgUADjsQlm1M444RhwpD0dQnpbi6JihTJ4mqfczy0HoCDymLuCk2Yv HN1kKUgKZ1WOk68RcEzbeav+9AmVnN/8OVkXmSKLLXgF5uEzKlgFMFUACWpsBXNWaQUf 92n/878kTZDp9E8MUPyRjAwAJI2mKC3mnHVId0jAXcQtIT/Ck/2PrgnFyy5wXllUYoai P6QRi6uOTVdN8hvHuI68LTfUM2ndu01ZLPXaMK8YiDuPHYwj1AGDgMuQOh8yzM7G1ZFJ 2CrQ== X-Gm-Message-State: AOJu0Yxvxzi06UWw8aTJuhC1o2K+/z4CmW/t+eeOjiST8SctiZd0Bdan bum8mYtuSBrNtv7lkEhmexJTtdl8K2bxVvqKKyLHlEMIJfTNBCwlnr9Jg8lX X-Google-Smtp-Source: AGHT+IHs/wO29Fh2+RV/IL2Enc7V/eDQ4mKo6N8Iopm+a6/tOTHbrBad5PLlGa1KvF8aHLeFRA6TcQ== X-Received: by 2002:a05:600c:5029:b0:410:41e5:3a3d with SMTP id n41-20020a05600c502900b0041041e53a3dmr509294wmr.5.1707380939080; Thu, 08 Feb 2024 00:28:59 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id j12-20020a05600c190c00b0040ebf603a89sm913321wmq.11.2024.02.08.00.28.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 00:28:58 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer Subject: [PATCH 7/7] python 3.12 compatible regex Date: Thu, 8 Feb 2024 09:27:33 +0100 Message-ID: <20240208082821.430510-8-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240208082821.430510-1-adrian.freihofer@siemens.com> References: <20240208082821.430510-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 ; Thu, 08 Feb 2024 08:29:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195112 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 --- bitbake/lib/bs4/tests/test_tree.py | 2 +- .../feature-microblaze-versions.inc | 2 +- meta/lib/oeqa/oetest.py | 2 +- meta/lib/oeqa/selftest/cases/bblayers.py | 2 +- meta/lib/oeqa/selftest/cases/fitimage.py | 6 +-- meta/lib/patchtest/tests/base.py | 4 +- meta/lib/patchtest/utils.py | 6 +-- .../perf/perf/sort-pmuevents.py | 8 ++-- meta/recipes-rt/rt-tests/files/rt_bmark.py | 2 +- 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 +- scripts/patchtest-get-branch | 2 +- 19 files changed, 56 insertions(+), 56 deletions(-) diff --git a/bitbake/lib/bs4/tests/test_tree.py b/bitbake/lib/bs4/tests/test_tree.py index 8e5c66426e8..cf0f1abe0cc 100644 --- a/bitbake/lib/bs4/tests/test_tree.py +++ b/bitbake/lib/bs4/tests/test_tree.py @@ -585,7 +585,7 @@ class SiblingTest(TreeTest): ''' # All that whitespace looks good but makes the tests more # difficult. Get rid of it. - markup = re.compile("\n\s*").sub("", markup) + markup = re.compile(r"\n\s*").sub("", markup) self.tree = self.soup(markup) diff --git a/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc b/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc index 5c37f49abb7..658e87b8cdb 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 diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index cf417db0d42..bcb6a878c7a 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py @@ -241,7 +241,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 8faa0602348..2475a79468f 100644 --- a/meta/lib/oeqa/selftest/cases/bblayers.py +++ b/meta/lib/oeqa/selftest/cases/bblayers.py @@ -54,7 +54,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 9383d0c4db1..347c0653776 100644 --- a/meta/lib/oeqa/selftest/cases/fitimage.py +++ b/meta/lib/oeqa/selftest/cases/fitimage.py @@ -204,7 +204,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: @@ -525,7 +525,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: @@ -680,7 +680,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: diff --git a/meta/lib/patchtest/tests/base.py b/meta/lib/patchtest/tests/base.py index aecbbc4aae5..424e61b5be2 100644 --- a/meta/lib/patchtest/tests/base.py +++ b/meta/lib/patchtest/tests/base.py @@ -34,8 +34,8 @@ class PatchtestOEError(Exception): class Base(unittest.TestCase): # if unit test fails, fail message will throw at least the following JSON: {"id": } - endcommit_messages_regex = re.compile('\(From \w+-\w+ rev:|(?') + 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 1939757f1bc..c69acb4095a 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 8271ed7fe3b..62ecdfe3906 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 d2997cc2420..8e9ff38db6c 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py @@ -1166,12 +1166,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\.\/\-]+$') lictext = [] with open(licfile, 'r', errors='surrogateescape') as f: diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py index d4b194f5679..ec9d510e233 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 4187e774581..0d171c44632 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 7412cc1f477..44ae40549ae 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 bc3ab43823a..084d9ef6845 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 = "" diff --git a/scripts/patchtest-get-branch b/scripts/patchtest-get-branch index b5fb2b0f04d..c6e242f8b68 100755 --- a/scripts/patchtest-get-branch +++ b/scripts/patchtest-get-branch @@ -16,7 +16,7 @@ import argparse import re import git -re_prefix = re.compile("(\[.*\])", re.DOTALL) +re_prefix = re.compile(r"(\[.*\])", re.DOTALL) def get_branch(filepath_repo, filepath_mbox, default_branch): branch = None