diff options
| author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2019-12-11 17:48:19 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-16 23:25:50 +0000 |
| commit | 29b3cc9655a0530226e0c1ba30ec16ca1750cf03 (patch) | |
| tree | 6487f27339366be1432b16e866b917021e6c2824 /meta/classes/license_image.bbclass | |
| parent | 38bea41f592ebfd269a6860d24270c3dee662cbe (diff) | |
| download | poky-29b3cc9655a0530226e0c1ba30ec16ca1750cf03.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.
(From OE-Core rev: b1863e570d4b169cd2f0ea7b4fe7c2348943cb2c)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license_image.bbclass')
| -rw-r--r-- | meta/classes/license_image.bbclass | 5 |
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): | |||
| 51 | for pkg in sorted(pkg_dic): | 51 | for pkg in sorted(pkg_dic): |
| 52 | if bad_licenses and pkg not in whitelist: | 52 | if bad_licenses and pkg not in whitelist: |
| 53 | try: | 53 | try: |
| 54 | if incompatible_pkg_license(d, bad_licenses, pkg_dic[pkg]["LICENSE"]): | 54 | licenses = incompatible_pkg_license(d, bad_licenses, pkg_dic[pkg]["LICENSE"]) |
| 55 | bb.fatal("Package %s has an incompatible license %s and cannot be installed into the image." %(pkg, pkg_dic[pkg]["LICENSE"])) | 55 | if licenses: |
| 56 | bb.fatal("Package %s cannot be installed into the image because it has incompatible license(s): %s" %(pkg, ' '.join(licenses))) | ||
| 56 | (pkg_dic[pkg]["LICENSE"], pkg_dic[pkg]["LICENSES"]) = \ | 57 | (pkg_dic[pkg]["LICENSE"], pkg_dic[pkg]["LICENSES"]) = \ |
| 57 | oe.license.manifest_licenses(pkg_dic[pkg]["LICENSE"], | 58 | oe.license.manifest_licenses(pkg_dic[pkg]["LICENSE"], |
| 58 | bad_licenses, canonical_license, d) | 59 | bad_licenses, canonical_license, d) |
