path: root/meta/lib
diff options
authorPeter Kjellerstedt <>2016-05-19 00:28:17 +0200
committerRichard Purdie <>2016-05-19 22:32:07 +0100
commit9948e0d3cb1f9aa04cf6c33d6fe4ba3bdea4e77a (patch)
treebecab51bafdf2ed2e2c695ba99d0c88b318ae3db /meta/lib
parent79d177822bca8049f7dc55924cf0548d22be4bcf (diff)
openembedded-core-contrib-9948e0d3cb1f9aa04cf6c33d6fe4ba3bdea4e77a.tar.bz2 Reduce spam from _log_check_warn()
For each warning found in the log, _log_check_warn() would output a line stating that it had found a warning, then the actual warning and finally an empty line. This is quite excessive when there are many warnings in the log. With this change the output is instead a line stating how many warnings were found, followed by the warnings. This makes the output much more compact and actually much more readable. (From OE-Core rev: d6e3477749b1d09d40a773e0ac857a24d5851984) Signed-off-by: Peter Kjellerstedt <> Signed-off-by: Richard Purdie <>
Diffstat (limited to 'meta/lib')
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/lib/oe/ b/meta/lib/oe/
index 741399adc2..479e4ccc5e 100644
--- a/meta/lib/oe/
+++ b/meta/lib/oe/
@@ -50,6 +50,7 @@ class Rootfs(object):
excludes = [re.compile(x) for x in excludes]
r = re.compile('^(warn|Warn|WARNING:)')
log_path = self.d.expand("${T}/log.do_rootfs")
+ messages = []
with open(log_path, 'r') as log:
for line in log:
for ee in excludes:
@@ -61,8 +62,14 @@ class Rootfs(object):
m =
if m:
- bb.warn('[log_check] %s: found a warning message in the logfile (keyword \'%s\'):\n[log_check] %s'
- % (self.d.getVar('PN', True),, line))
+ messages.append('[log_check] %s' % line)
+ if messages:
+ if len(messages) == 1:
+ msg = 'a warning message'
+ else:
+ msg = '%d warning messages' % len(messages)
+ bb.warn('[log_check] %s: found %s in the logfile:\n%s'
+ % (self.d.getVar('PN', True), msg, ''.join(messages)))
def _log_check_error(self):
# Ignore any lines containing log_check to avoid recursion, and ignore