]> code.ossystems Code Review - openembedded-core.git/commitdiff
base.bbclass: replace COMMERCIAL_LICENSE code with LICENSE_FLAGS code
authorTom Zanussi <tom.zanussi@intel.com>
Sat, 31 Dec 2011 19:46:26 +0000 (13:46 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 24 Jan 2012 11:23:54 +0000 (11:23 +0000)
The COMMERCIAL_LICENSE mechanism has been superseded by LICENSE_FLAGS
so remove the code that implements COMMERCIAL_LICENSE and replace it
with the corresponding LICENSE_FLAGS version.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
meta/classes/base.bbclass

index bedb73b1692c6ca2f6437f14a83c4a8ebc0d47b5..a26ac9485eed9b479dbd5f18d2cc8c56df26e10e 100644 (file)
@@ -349,12 +349,12 @@ python () {
     if license == "INVALID":
         bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn)
 
-    commercial_license = " %s " % d.getVar('COMMERCIAL_LICENSE', 1)
-    import re
-    pnr = "[ \t]%s[ \t]" % pn.replace('+', "\+")
-    if commercial_license and re.search(pnr, commercial_license):
-        bb.debug(1, "Skipping %s because it's commercially licensed" % pn)
-        raise bb.parse.SkipPackage("because it may require a commercial license to ship in a product (listed in COMMERCIAL_LICENSE)")
+    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