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 22:01:28 +0000 |
| commit | 6638a7289e63a62878a70afa1f79616e3e8097cb (patch) | |
| tree | 932376e2fb6d4c97c0595a5791b6f51beb04208a /meta/lib/oe | |
| parent | 1e599c15d8cbf16657bb932534386c8a664d00e0 (diff) | |
| download | poky-6638a7289e63a62878a70afa1f79616e3e8097cb.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.
(From OE-Core rev: d1baf74ac92fe0c8c32dff101fd77d77f70fd583)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
| -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 | |||
| 10 | def license_ok(license, dont_want_licenses): | 10 | def license_ok(license, dont_want_licenses): |
| 11 | """ Return False if License exist in dont_want_licenses else True """ | 11 | """ Return False if License exist in dont_want_licenses else True """ |
| 12 | for dwl in dont_want_licenses: | 12 | for dwl in dont_want_licenses: |
| 13 | # If you want to exclude license named generically 'X', we | 13 | if fnmatch(license, dwl): |
| 14 | # surely want to exclude 'X+' as well. In consequence, we | ||
| 15 | # will exclude a trailing '+' character from LICENSE in | ||
| 16 | # case INCOMPATIBLE_LICENSE is not a 'X+' license. | ||
| 17 | lic = license | ||
| 18 | if not re.search(r'\+$', dwl): | ||
| 19 | lic = re.sub(r'\+', '', license) | ||
| 20 | if fnmatch(lic, dwl): | ||
| 21 | return False | 14 | return False |
| 22 | return True | 15 | return True |
| 23 | 16 | ||
