package.bbclass: Report only the licenses that are incompatible

When excluding a package from being packaged due to incompatible
licenses, report the license(s) that are actually incompatible.

(From OE-Core rev: 7d5c07e4a32a0968942ae538023c2891b59d8ab5)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Peter Kjellerstedt
2019-12-11 17:48:18 +01:00
committed by Richard Purdie
parent 5560c50316
commit 38bea41f59

View File

@@ -1263,8 +1263,9 @@ python populate_packages () {
# Handle LICENSE_EXCLUSION
package_list = []
for pkg in packages:
if d.getVar('LICENSE_EXCLUSION-' + pkg):
msg = "%s has an incompatible license. Excluding from packaging." % pkg
licenses = d.getVar('LICENSE_EXCLUSION-' + pkg)
if licenses:
msg = "Excluding %s from packaging as it has incompatible license(s): %s" % (pkg, licenses)
package_qa_handle_error("incompatible-license", msg, d)
else:
package_list.append(pkg)