]> code.ossystems Code Review - openembedded-core.git/commitdiff
base.bbclass: Remove implicit dependency on license.bbclass
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Dec 2012 11:55:20 +0000 (11:55 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 7 Dec 2012 17:35:33 +0000 (17:35 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass

index 0ee9d2e710088ad65fab85b784bf49635b869dfb..ac97a35c4c9b43e265f0780eb3748d3747aee879 100644 (file)
@@ -486,12 +486,13 @@ python () {
     if license == "INVALID":
         bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn)
 
-    unmatched_license_flag = check_license_flags(d)
-    if unmatched_license_flag:
-        bb.debug(1, "Skipping %s because it has a restricted license not"
-             " whitelisted in LICENSE_FLAGS_WHITELIST" % pn)
-        raise bb.parse.SkipPackage("because it has a restricted license not"
-             " whitelisted in LICENSE_FLAGS_WHITELIST")
+    if bb.data.inherits_class('license', d):
+        unmatched_license_flag = check_license_flags(d)
+        if unmatched_license_flag:
+            bb.debug(1, "Skipping %s because it has a restricted license not"
+                 " whitelisted in LICENSE_FLAGS_WHITELIST" % pn)
+            raise bb.parse.SkipPackage("because it has a restricted license not"
+                 " whitelisted in LICENSE_FLAGS_WHITELIST")
 
     # If we're building a target package we need to use fakeroot (pseudo)
     # in order to capture permissions, owners, groups and special files