mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
a3da6c381f
commit
bdf2d94c35
@@ -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)
|
||||
else:
|
||||
package_list.append(pkg)
|
||||
|
||||
for pkg in packages.split():
|
||||
if d.getVar('LICENSE_EXCLUSION-' + pkg, True):
|
||||
bb.warn("%s has an incompatible license. Excluding from packaging." % pkg)
|
||||
packages.remove(pkg)
|
||||
else:
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user