All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH resend] meta/classes: add class to test for unsatisfied RRECOMMENDS
@ 2017-08-25  6:43 Jose Alarcon
  2017-08-25 12:29 ` Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Jose Alarcon @ 2017-08-25  6:43 UTC (permalink / raw)
  To: openembedded-core

The do_rootfs log contains a number of unsatisfied package
recommendations. At the moment those are only visible when
reviewing the rootfs log.

This class adds an extra check to surface any unsatisfied
recommendation  as WARNINGS to the build output.

Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
---
 meta/classes/rootfs-check-recommends.bbclass | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 meta/classes/rootfs-check-recommends.bbclass

diff --git a/meta/classes/rootfs-check-recommends.bbclass b/meta/classes/rootfs-check-recommends.bbclass
new file mode 100644
index 0000000..351e438
--- /dev/null
+++ b/meta/classes/rootfs-check-recommends.bbclass
@@ -0,0 +1,21 @@
+#
+# This bbclass adds an extra check to surface any unsatisfied
+# recommendation (RRECOMMENDS) as WARNINGS to the build output.
+#
+# To enable, use INHERIT in conf/distro/distro.conf:
+#
+#       INHERIT += "rootfs-check-recommends"
+#
+
+python 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))
+}
+
+do_rootfs[postfuncs] += "log_check_recommends "
-- 
2.10.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-29  6:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25  6:43 [PATCH resend] meta/classes: add class to test for unsatisfied RRECOMMENDS Jose Alarcon
2017-08-25 12:29 ` Richard Purdie
2017-08-26 11:27   ` EXT: " Jose Alarcon
2017-08-29  6:44     ` Jose Alarcon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.