From 44c5efb4537ef99ab992fb17a9391f503c60bd1e Mon Sep 17 00:00:00 2001 From: Jose Alarcon Date: Mon, 4 Sep 2017 08:12:24 +0300 Subject: [PATCH] rootfs-postcommands: add test for unsatisfied RRECOMMENDS The do_rootfs log contains a number of unsatisfied package recommendations. At the moment those are only visible when reviewing the rootfs log. This patch adds an extra check to surface any unsatisfied recommendation as WARNINGS to the build output. Enable this check with: ROOTFS_POSTPROCESS_COMMAND += "rootfs_log_check_recommends;" (From OE-Core rev: 9d049bf7941f30e35c51775684559e95185fba96) (From OE-Core rev: 514cadd28d05f5060b2538ef9b2920370c22bf73) Signed-off-by: Jose Alarcon Signed-off-by: Richard Purdie Signed-off-by: Armin Kuster Signed-off-by: Richard Purdie --- meta/classes/rootfs-postcommands.bbclass | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass index a107d0e472..2503d89e28 100644 --- a/meta/classes/rootfs-postcommands.bbclass +++ b/meta/classes/rootfs-postcommands.bbclass @@ -305,3 +305,15 @@ python write_image_test_data() { os.remove(testdata_link) os.symlink(os.path.basename(testdata), testdata_link) } + +# Check for unsatisfied recommendations (RRECOMMENDS) +python rootfs_log_check_recommends() { + log_path = d.expand("${T}/log.do_rootfs") + with open(log_path, 'r') as log: + for line in log: + if 'log_check' in line: + continue + + if 'unsatisfied recommendation for' in line: + bb.warn('[log_check] %s: %s' % (d.getVar('PN', True), line)) +}