summaryrefslogtreecommitdiff
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 11:08:38 +0100
commita8d7246f7b13ef2636c325263c8bfa22552d7a57 (patch)
tree7557bf4ce17aadb87ef61c373179e91f953a256e /meta/classes/package.bbclass
parent178be339e09078c56a5231a10551f3b9aed16f9c (diff)
downloadopenembedded-core-a8d7246f7b13ef2636c325263c8bfa22552d7a57.tar.gz
openembedded-core-a8d7246f7b13ef2636c325263c8bfa22552d7a57.tar.bz2
openembedded-core-a8d7246f7b13ef2636c325263c8bfa22552d7a57.tar.xz
openembedded-core-a8d7246f7b13ef2636c325263c8bfa22552d7a57.zip
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. 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 bdc4d37af..20af8b791 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -887,15 +887,20 @@ python populate_packages () {
bb.mkdirhier(outdir)
os.chdir(dvar)
- # Sanity check PACKAGES for duplicates - should be moved to
- # sanity.bbclass once we have the infrastucture
+ # Sanity check PACKAGES for duplicates and for LICENSE_EXCLUSION
+ # Sanity should be moved to sanity.bbclass once we have the infrastucture
package_list = []
+
for pkg in packages.split():
- if pkg in package_list:
- bb.error("%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg)
+ if d.getVar('LICENSE_EXCLUSION-' + pkg, True):
+ bb.warn("%s has an incompatible license. Excluding from packaging." % pkg)
+ packages.remove(pkg)
else:
- package_list.append(pkg)
-
+ if pkg in package_list:
+ bb.error("%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg)
+ else:
+ package_list.append(pkg)
+ d.setVar('PACKAGES', ' '.join(package_list))
pkgdest = d.getVar('PKGDEST', True)
os.system('rm -rf %s' % pkgdest)