Add a package QA check for when a package RRECOMMENDS another that won't be built because it is empty and ALLOW_EMPTY is not set. This happens usually when ${PN}-dev RRECOMMENDS ${PN} but ${PN} is empty. This is not an error but might be something to look into.
Example of a generated warning: WARNING: python3-3.11.2-r0 do_package_qa: QA Issue: python3-dev -> python3 but won't be build [rrecommends-non-existent] Note: This QA check is voluntarily not enabled by default. This will make bugs [YOCTO #8222] and [YOCTO #6839] appear in the QA logs. Co-authored-by: Fawzi Khaber <fawzi.kha...@smile.fr> Signed-off-by: Yoann Congal <yoann.con...@smile.fr> --- meta/classes-global/insane.bbclass | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index 5743d91240..14334f02a9 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass @@ -1088,6 +1088,17 @@ def package_qa_check_empty_dirs(pkg, d, messages): msg = "%s installs files in %s, %s" % (pkg, dir, recommendation) oe.qa.add_message(messages, "empty-dirs", msg) +QAPKGTEST[rrecommends-non-existent] = "package_qa_check_rrecommends_non_existent" +def package_qa_check_rrecommends_non_existent(pkg, d, messages): + pkg_data = oe.packagedata.read_subpkgdata_dict(pkg, d) + rrecommends = bb.utils.explode_dep_versions2(pkg_data.get("RRECOMMENDS", "")) + for rrecommend in rrecommends: + rrec_data = oe.packagedata.read_subpkgdata_dict(rrecommend, d) + if (rrecommend in (d.getVar("PACKAGES") or "").split() + and rrec_data["FILES_INFO"] == "{}" + and not bb.utils.to_boolean(rrec_data.get("ALLOW_EMPTY", "0"), False)): + oe.qa.add_message(messages, "rrecommends-non-existent", "{0} rrecommends {1} but {1} won't be built".format(pkg, rrecommend)) + def package_qa_check_encoding(keys, encode, d): def check_encoding(key, enc): sane = True -- 2.30.2
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#188382): https://lists.openembedded.org/g/openembedded-core/message/188382 Mute This Topic: https://lists.openembedded.org/mt/101647339/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-