summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2019-12-11 17:48:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-16 23:22:03 +0000
commitb1863e570d4b169cd2f0ea7b4fe7c2348943cb2c (patch)
treeb68e2964dacf3c01d4955fa606ab8ffa0def4605 /meta/classes
parent7d5c07e4a32a0968942ae538023c2891b59d8ab5 (diff)
downloadopenembedded-core-b1863e570d4b169cd2f0ea7b4fe7c2348943cb2c.tar.gz
license_image.bbclass: Report only the licenses that are incompatible
Instead of reporting ${LICENSE} when a package cannot be installed into an image because it is using an incompatible license, report the license(s) that are actually incompatible. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/license_image.bbclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/license_image.bbclass b/meta/classes/license_image.bbclass
index b5399b6d96..a8c72da3cb 100644
--- a/meta/classes/license_image.bbclass
+++ b/meta/classes/license_image.bbclass
@@ -51,8 +51,9 @@ def write_license_files(d, license_manifest, pkg_dic, rootfs=True):
for pkg in sorted(pkg_dic):
if bad_licenses and pkg not in whitelist:
try:
- if incompatible_pkg_license(d, bad_licenses, pkg_dic[pkg]["LICENSE"]):
- bb.fatal("Package %s has an incompatible license %s and cannot be installed into the image." %(pkg, pkg_dic[pkg]["LICENSE"]))
+ licenses = incompatible_pkg_license(d, bad_licenses, pkg_dic[pkg]["LICENSE"])
+ if licenses:
+ bb.fatal("Package %s cannot be installed into the image because it has incompatible license(s): %s" %(pkg, ' '.join(licenses)))
(pkg_dic[pkg]["LICENSE"], pkg_dic[pkg]["LICENSES"]) = \
oe.license.manifest_licenses(pkg_dic[pkg]["LICENSE"],
bad_licenses, canonical_license, d)