summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorElizabeth Flanagan <elizabeth.flanagan@intel.com>2012-03-23 16:51:42 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-25 12:23:38 +0100
commitbdf2d94c35b7e5ed1723f987696a6c865bff212c (patch)
tree6a39dfeac0ff192a45143842e4b70e96a57aee1c /meta/classes/package.bbclass
parenta3da6c381f792535e68a67f7cb78eb82b5a09842 (diff)
downloadpoky-bdf2d94c35b7e5ed1723f987696a6c865bff212c.tar.gz
INCOMPATIBLE_LICENSE: support for spdx and pkg licenses
This adds a few things to the incompatible license functionality 1. INCOMPATIBLE_LICENSE was unable to distinguish any variation within LICENSE (e.g. GPLv3 v. GPLv3.0). This now utilizes the SPDXLICENSEMAP of the license indicated as INCOMPATIBLE_LICENSE 2. Given a recipe where the main LICENSE was incompatible but a package of the recipe was compatible, the entire recipe would be excluded. This allows us some finer grained control over what exactly gets excluded. (From OE-Core rev: a8d7246f7b13ef2636c325263c8bfa22552d7a57) Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass17
1 files changed, 11 insertions, 6 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index bdc4d37af6..20af8b7914 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -887,15 +887,20 @@ python populate_packages () {
887 bb.mkdirhier(outdir) 887 bb.mkdirhier(outdir)
888 os.chdir(dvar) 888 os.chdir(dvar)
889 889
890 # Sanity check PACKAGES for duplicates - should be moved to 890 # Sanity check PACKAGES for duplicates and for LICENSE_EXCLUSION
891 # sanity.bbclass once we have the infrastucture 891 # Sanity should be moved to sanity.bbclass once we have the infrastucture
892 package_list = [] 892 package_list = []
893
893 for pkg in packages.split(): 894 for pkg in packages.split():
894 if pkg in package_list: 895 if d.getVar('LICENSE_EXCLUSION-' + pkg, True):
895 bb.error("%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg) 896 bb.warn("%s has an incompatible license. Excluding from packaging." % pkg)
897 packages.remove(pkg)
896 else: 898 else:
897 package_list.append(pkg) 899 if pkg in package_list:
898 900 bb.error("%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg)
901 else:
902 package_list.append(pkg)
903 d.setVar('PACKAGES', ' '.join(package_list))
899 pkgdest = d.getVar('PKGDEST', True) 904 pkgdest = d.getVar('PKGDEST', True)
900 os.system('rm -rf %s' % pkgdest) 905 os.system('rm -rf %s' % pkgdest)
901 906