[oe-commits] Christopher Larson : license: correct re.search/fnmatch indentation

git at git.openembedded.org git at git.openembedded.org
Fri Jan 18 13:31:14 UTC 2013


Module: openembedded-core.git
Branch: master
Commit: df4a4b9792e3bd13b396b94e232c69054fdf19b5
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=df4a4b9792e3bd13b396b94e232c69054fdf19b5

Author: Christopher Larson <chris_larson at mentor.com>
Date:   Tue Jan 15 13:22:47 2013 -0700

license: correct re.search/fnmatch indentation

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

Signed-off-by: Christopher Larson <chris_larson at mentor.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/license.bbclass |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index c8a8c63..cfb816d 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -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





More information about the Openembedded-commits mailing list