From 8a5bae76f91f2411187c638a42fa3c762052cf11 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 7 Jun 2017 21:04:16 +0200 Subject: tinfoil: fix duplication of log messages Adding an additional logger in setup_bitbake() interacts poorly with the logger we have added by default in tinfoil's constructor, with the result that messages may be doubled or even tripled in tinfoil-using scripts. Disable adding this one when calling setup_bitbake() from tinfoil to avoid this problem. Part of the fix for [YOCTO #11275]. Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- lib/bb/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/bb/main.py') diff --git a/lib/bb/main.py b/lib/bb/main.py index 8c948c2c1..29e391162 100755 --- a/lib/bb/main.py +++ b/lib/bb/main.py @@ -477,10 +477,10 @@ def bitbake_main(configParams, configuration): return 1 -def setup_bitbake(configParams, configuration, extrafeatures=None): +def setup_bitbake(configParams, configuration, extrafeatures=None, setup_logging=True): # Ensure logging messages get sent to the UI as events handler = bb.event.LogHandler() - if not configParams.status_only: + if setup_logging and not configParams.status_only: # In status only mode there are no logs and no UI logger.addHandler(handler) -- cgit 1.2.3-korg