After the comparism between computedpkglics and recipe lics, the warnings are displayed if and only if there are licenses in the recipes not found in the sources.
Signed-off-by: Ida Delphine <idad...@gmail.com> --- meta/classes/package.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index ab96f141ae..efdc169275 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -1548,6 +1548,7 @@ python emit_pkgdata() { from glob import glob import json import subprocess + import oe.license def process_postinst_on_target(pkg, mlprefix): pkgval = d.getVar('PKG_%s' % pkg) @@ -1762,7 +1763,11 @@ fi lic = d.getVar('LICENSE_%s' % (pkg)) if not lic: lic = d.getVar('LICENSE') - bb.warn("License for package %s is %s vs %s" % (pkg, computedpkglics[pkg], lic)) + spdx_lic = oe.license.split_spdx_lic(lic, d) + + # Displays warnings for licenses found in the recipes and not sources + if spdx_lic - computedpkglics[pkg]: + bb.warn("License for package %s is %s vs %s" % (pkg, computedpkglics[pkg], spdx_lic)) } emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse ${PKGDESTWORK}/runtime-rprovides" -- 2.25.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#149557): https://lists.openembedded.org/g/openembedded-core/message/149557 Mute This Topic: https://lists.openembedded.org/mt/81371632/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-