summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-12-13 11:05:06 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-14 12:30:49 +0000
commitaf867199a5df1b0416f1d1b91427c028d4fa2efd (patch)
tree0479b53fba336e606893ef84e79e725d32dd73ab /meta/classes/image.bbclass
parent13916a4fab0b428ae6b51e6863921eac14821368 (diff)
downloadpoky-af867199a5df1b0416f1d1b91427c028d4fa2efd.tar.gz
classes/image: suppress log_check mechanism for warnings/errors logged through BitBake
If you printed a warning through bb.warn() / bbwarn or an error through bb.error() / bberror, this was also being picked up by our log_check mechanism that was designed to pick up warnings and errors printed by other programs used during do_rootfs. This meant you saw not only the warning or error itself, you saw it a second time through log_check, which is a bit ugly. Use the just-added BB_TASK_LOGGER to access the logger and add a handler that we can use to find out if any warning or error we find in the logs is one we should ignore as it has already been printed. Fixes [YOCTO #8223]. (From OE-Core rev: fb37304d27857df3c53c0867e81fbc8899b48089) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass10
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index b10272a415..e63f6a3bfe 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -208,6 +208,14 @@ PACKAGE_EXCLUDE[type] = "list"
208fakeroot python do_rootfs () { 208fakeroot python do_rootfs () {
209 from oe.rootfs import create_rootfs 209 from oe.rootfs import create_rootfs
210 from oe.manifest import create_manifest 210 from oe.manifest import create_manifest
211 import logging
212
213 logger = d.getVar('BB_TASK_LOGGER', False)
214 if logger:
215 logcatcher = bb.utils.LogCatcher()
216 logger.addHandler(logcatcher)
217 else:
218 logcatcher = None
211 219
212 # NOTE: if you add, remove or significantly refactor the stages of this 220 # NOTE: if you add, remove or significantly refactor the stages of this
213 # process then you should recalculate the weightings here. This is quite 221 # process then you should recalculate the weightings here. This is quite
@@ -255,7 +263,7 @@ fakeroot python do_rootfs () {
255 progress_reporter.next_stage() 263 progress_reporter.next_stage()
256 264
257 # generate rootfs 265 # generate rootfs
258 create_rootfs(d, progress_reporter=progress_reporter) 266 create_rootfs(d, progress_reporter=progress_reporter, logcatcher=logcatcher)
259 267
260 progress_reporter.finish() 268 progress_reporter.finish()
261} 269}