]> code.ossystems Code Review - openembedded-core.git/commitdiff
license: correct re.search/fnmatch indentation
authorChristopher Larson <chris_larson@mentor.com>
Tue, 15 Jan 2013 20:22:47 +0000 (13:22 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Jan 2013 13:03:41 +0000 (13:03 +0000)
This was causing it to only obey the last of the elements in
INCOMPATIBLE_LICENSE.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/license.bbclass

index c8a8c639fac8edffe51794f7e5b7a27f24cac387..cfb816d5a4429a7165771c37e26ebe1add4ce2db 100644 (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