diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-18 15:05:24 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-21 21:59:52 +0000 |
commit | d1baf74ac92fe0c8c32dff101fd77d77f70fd583 (patch) | |
tree | b9834af621c7c82a06f1cb08d598397df0c00938 /meta/lib | |
parent | ccc785f9d428b279c8aa9a1ca00dc685342fdb1e (diff) | |
download | openembedded-core-contrib-d1baf74ac92fe0c8c32dff101fd77d77f70fd583.tar.gz |
licenses: Fix canonical license for 'or-later' handling
GPLv2 and GPLv2+ are two difference licenses with different meanings
and we can't just pretend they're the same thing. Change the code
to treat them separately.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/license.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/meta/lib/oe/license.py b/meta/lib/oe/license.py index c1274a61de..665d32ecbb 100644 --- a/meta/lib/oe/license.py +++ b/meta/lib/oe/license.py @@ -10,14 +10,7 @@ from fnmatch import fnmatchcase as fnmatch def license_ok(license, dont_want_licenses): """ Return False if License exist in dont_want_licenses else True """ for dwl in dont_want_licenses: - # If you want to exclude license named generically 'X', we - # surely want to exclude 'X+' as well. In consequence, we - # will exclude a trailing '+' character from LICENSE in - # case INCOMPATIBLE_LICENSE is not a 'X+' license. - lic = license - if not re.search(r'\+$', dwl): - lic = re.sub(r'\+', '', license) - if fnmatch(lic, dwl): + if fnmatch(license, dwl): return False return True |