1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 17:19:20 +00:00

license: correct re.search/fnmatch indentation

This was causing it to only obey the last of the elements in
INCOMPATIBLE_LICENSE.

(From OE-Core rev: df4a4b9792e3bd13b396b94e232c69054fdf19b5)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Christopher Larson
2013-01-15 13:22:47 -07:00
committed by Richard Purdie
parent feca9f7849
commit 8491c2a522
+4 -4
View File
@@ -226,10 +226,10 @@ def incompatible_license(d, dont_want_licenses, package=None):
# will exclude a trailing '+' character from LICENSE in
# case INCOMPATIBLE_LICENSE is not a 'X+' license.
lic = license
if not re.search('\+$', dwl):
lic = re.sub('\+', '', license)
if fnmatch(lic, dwl):
return False
if not re.search('\+$', dwl):
lic = re.sub('\+', '', license)
if fnmatch(lic, dwl):
return False
return True
# Handles an "or" or two license sets provided by