From: Peter Kjellerstedt Date: Wed, 11 Dec 2019 16:48:18 +0000 (+0100) Subject: package.bbclass: Report only the licenses that are incompatible X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~12480 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d5c07e4a32a0968942ae538023c2891b59d8ab5;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Peter Kjellerstedt Signed-off-by: Richard Purdie --- diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index e0d6ff67018..ef3de35961c 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -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)