summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/license.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/license.py')
-rw-r--r--meta/lib/oe/license.py9
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
10def license_ok(license, dont_want_licenses): 10def 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