]> code.ossystems Code Review - openembedded-core.git/commitdiff
rootfs-postcommands: add test for unsatisfied RRECOMMENDS
authorJose Alarcon <jose.alarcon@ge.com>
Mon, 4 Sep 2017 05:12:24 +0000 (08:12 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 5 Sep 2017 13:58:37 +0000 (14:58 +0100)
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;"

Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/rootfs-postcommands.bbclass

index fb36bad7f384c4b33f151a48ae00790835cc2945..f6d31a00f7294a5ec7eb5cbd390b4c0ca0a167ed 100644 (file)
@@ -307,3 +307,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))
+}