]> code.ossystems Code Review - openembedded-core.git/commitdiff
base.bbclass: add support for commercial license check
authorSaul Wold <Saul.Wold@intel.com>
Fri, 8 Oct 2010 06:35:26 +0000 (23:35 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 8 Oct 2010 15:46:33 +0000 (16:46 +0100)
This addresses [BUGID #410], require implict action by someone to enable
functionality that may have license implications.

By default this diables mp3 and mpeg decoding

Signed-off-by: Saul Wold <Saul.Wold@intel.com>
meta/classes/base.bbclass
meta/conf/distro/poky.conf

index 9ab8204dbce824ecb4a2243b83fa9c6ed9718f4a..3c3c779dba2253499eb1e1c2621c78bbb5c33fde 100644 (file)
@@ -466,6 +466,12 @@ python () {
     if license == "INVALID":
         bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn)
 
+    commercial_license = bb.data.getVar('COMMERCIAL_LICENSE', d, 1)
+    import re
+    if commercial_license and re.search(pn, commercial_license):
+        bb.note("SKIPPING %s because it's Commerciallly Licensed" % pn)
+        raise bb.parse.SkipPackage("because it requires commercial license to ship product")
+
     # If we're building a target package we need to use fakeroot (pseudo)
     # in order to capture permissions, owners, groups and special files
     if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
index 6db45cb01de82ae839ad508fe3e6013ecceb0a5f..89d1b5acb637eafd956e479a61c73bb832f16c5d 100644 (file)
@@ -123,6 +123,11 @@ GPLv3_HOSTTOOLS_WHITELIST = ""
 GPLv3_WHITELIST = "less gnome-common"
 GPLv3_LGPLv2_WHITELIST = "libassuan gnutls libtasn1 libidn" 
 
+# This is a list of packages that require a commercial license to ship
+# product. If shipped as part of an image these packages may have 
+# implications so they are disabled by default
+COMMERCIAL_LICENSE = "lame gst-fluendo-mp3 libmad mpeg2dec ffmpeg qmmp"
+
 require conf/distro/include/world-broken.inc
 require conf/distro/include/distro_tracking_fields.inc