aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2021-02-23 11:18:28 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-03-11 14:04:08 +0000
commitf6fb6f22fa6ba1ffe121948d7f53ac724358491e (patch)
tree72d26897541730d1e2fb48560e256a2e840397b1
parent134df841b273d94e767426876459da348d96dd23 (diff)
downloadbitbake-f6fb6f22fa6ba1ffe121948d7f53ac724358491e.tar.gz
event.py: fix regression about INVALIDCONF
A previous commit uses __BBHANDLERS_MC to record all handlers, but it does not take into consideration of INVALIDCONF, thus causing regression. We need to record the name before returned AlreadyRegistered, otherwise, when reparsing due to INVALIDCONF, bascially all handlers are not called. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/event.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 23e1f3187..3e5718395 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -238,6 +238,10 @@ def register(name, handler, mask=None, filename=None, lineno=None, data=None):
# already registered
if name in _handlers:
+ if data:
+ bbhands_mc = (data.getVar("__BBHANDLERS_MC") or [])
+ bbhands_mc.append(name)
+ data.setVar("__BBHANDLERS_MC", bbhands_mc)
return AlreadyRegistered
if handler is not None: