From 8a1de49b565f528c9569cee522ff0ce1b2bc4d90 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 2 Mar 2022 11:23:21 +0000 Subject: recipetool/devtool: Further SPDX identifier cleanups Some of these are hard to know what to do with since the original source files for the checksum aren't present. The safe option is to use "-only" as often the main license is ambiguous and the source files themselves determine the "or-later" possibility. The "-only" option therefore is realistically what we need to use in this code. (From OE-Core rev: 2b0cbafc7854de0308a624b17b8aaba704b031d5) Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/oelib/license.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'meta/lib/oeqa/selftest/cases/oelib/license.py') diff --git a/meta/lib/oeqa/selftest/cases/oelib/license.py b/meta/lib/oeqa/selftest/cases/oelib/license.py index 6ebbee589f..3b359396b6 100644 --- a/meta/lib/oeqa/selftest/cases/oelib/license.py +++ b/meta/lib/oeqa/selftest/cases/oelib/license.py @@ -15,11 +15,11 @@ class SeenVisitor(oe.license.LicenseVisitor): class TestSingleLicense(TestCase): licenses = [ - "GPLv2", - "LGPL-2.0", - "Artistic", + "GPL-2.0-only", + "LGPL-2.0-only", + "Artistic-1.0", "MIT", - "GPLv3+", + "GPL-3.0-or-later", "FOO_BAR", ] invalid_licenses = ["GPL/BSD"] @@ -67,9 +67,9 @@ class TestComplexCombinations(TestSimpleCombinations): "FOO & (BAR | BAZ)&MOO": ["FOO", "BAR", "MOO"], "(ALPHA|(BETA&THETA)|OMEGA)&DELTA": ["OMEGA", "DELTA"], "((ALPHA|BETA)&FOO)|BAZ": ["BETA", "FOO"], - "(GPL-2.0|Proprietary)&BSD-4-clause&MIT": ["GPL-2.0", "BSD-4-clause", "MIT"], + "(GPL-2.0-only|Proprietary)&BSD-4-clause&MIT": ["GPL-2.0-only", "BSD-4-clause", "MIT"], } - preferred = ["BAR", "OMEGA", "BETA", "GPL-2.0"] + preferred = ["BAR", "OMEGA", "BETA", "GPL-2.0-only"] class TestIsIncluded(TestCase): tests = { @@ -87,12 +87,12 @@ class TestIsIncluded(TestCase): [True, ["BAR", "FOOBAR"]], ("(FOO | BAR) & FOOBAR | BAZ & MOO & BARFOO", None, "FOO"): [True, ["BAZ", "MOO", "BARFOO"]], - ("GPL-3.0 & GPL-2.0 & LGPL-2.1 | Proprietary", None, None): - [True, ["GPL-3.0", "GPL-2.0", "LGPL-2.1"]], - ("GPL-3.0 & GPL-2.0 & LGPL-2.1 | Proprietary", None, "GPL-3.0"): + ("GPL-3.0-or-later & GPL-2.0-only & LGPL-2.1-only | Proprietary", None, None): + [True, ["GPL-3.0-or-later", "GPL-2.0-only", "LGPL-2.1-only"]], + ("GPL-3.0-or-later & GPL-2.0-only & LGPL-2.1-only | Proprietary", None, "GPL-3.0-or-later"): [True, ["Proprietary"]], - ("GPL-3.0 & GPL-2.0 & LGPL-2.1 | Proprietary", None, "GPL-3.0 Proprietary"): - [False, ["GPL-3.0"]] + ("GPL-3.0-or-later & GPL-2.0-only & LGPL-2.1-only | Proprietary", None, "GPL-3.0-or-later Proprietary"): + [False, ["GPL-3.0-or-later"]] } def test_tests(self): -- cgit v1.2.3-54-g00ecf