diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-06-07 21:04:16 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-12 15:07:39 +0100 |
commit | d44d5a2e79affce73750561c1e1ca58f8fcb7bb1 (patch) | |
tree | 2e37dec8a23c57e4e975e46817929a098cf6e46d | |
parent | 833520d2fb8cdef2f6fdc7a0550aba1f67724c27 (diff) | |
download | poky-d44d5a2e79affce73750561c1e1ca58f8fcb7bb1.tar.gz |
bitbake: 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].
(Bitbake rev: 8a5bae76f91f2411187c638a42fa3c762052cf11)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | bitbake/lib/bb/main.py | 4 | ||||
-rw-r--r-- | bitbake/lib/bb/tinfoil.py | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py index 8c948c2c15..29e391162e 100755 --- a/bitbake/lib/bb/main.py +++ b/bitbake/lib/bb/main.py | |||
@@ -477,10 +477,10 @@ def bitbake_main(configParams, configuration): | |||
477 | 477 | ||
478 | return 1 | 478 | return 1 |
479 | 479 | ||
480 | def setup_bitbake(configParams, configuration, extrafeatures=None): | 480 | def setup_bitbake(configParams, configuration, extrafeatures=None, setup_logging=True): |
481 | # Ensure logging messages get sent to the UI as events | 481 | # Ensure logging messages get sent to the UI as events |
482 | handler = bb.event.LogHandler() | 482 | handler = bb.event.LogHandler() |
483 | if not configParams.status_only: | 483 | if setup_logging and not configParams.status_only: |
484 | # In status only mode there are no logs and no UI | 484 | # In status only mode there are no logs and no UI |
485 | logger.addHandler(handler) | 485 | logger.addHandler(handler) |
486 | 486 | ||
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index 563c0c4d82..fb0da62243 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py | |||
@@ -245,7 +245,8 @@ class Tinfoil: | |||
245 | 245 | ||
246 | server, self.server_connection, ui_module = setup_bitbake(config_params, | 246 | server, self.server_connection, ui_module = setup_bitbake(config_params, |
247 | cookerconfig, | 247 | cookerconfig, |
248 | extrafeatures) | 248 | extrafeatures, |
249 | setup_logging=False) | ||
249 | 250 | ||
250 | self.ui_module = ui_module | 251 | self.ui_module = ui_module |
251 | 252 | ||