All of lore.kernel.org
 help / color / mirror / Atom feed
* [bitbake-devel][PATCH V2] event.py: fix regression about INVALIDCONF
@ 2021-02-23  3:18 Chen Qi
  0 siblings, 0 replies; 2+ messages in thread
From: Chen Qi @ 2021-02-23  3:18 UTC (permalink / raw)
  To: bitbake-devel

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>
---
 lib/bb/event.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/bb/event.py b/lib/bb/event.py
index 23e1f318..3e571839 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:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [bitbake-devel][PATCH V2] event.py: fix regression about INVALIDCONF
       [not found] <1666423A21FAB1A2.13558@lists.openembedded.org>
@ 2021-03-01  1:39 ` Chen Qi
  0 siblings, 0 replies; 2+ messages in thread
From: Chen Qi @ 2021-03-01  1:39 UTC (permalink / raw)
  To: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

ping

On 02/23/2021 11:18 AM, Chen Qi wrote:
> 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>
> ---
>   lib/bb/event.py | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/lib/bb/event.py b/lib/bb/event.py
> index 23e1f318..3e571839 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:
>
>
> 
>


[-- Attachment #2: Type: text/html, Size: 1593 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-01  1:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23  3:18 [bitbake-devel][PATCH V2] event.py: fix regression about INVALIDCONF Chen Qi
     [not found] <1666423A21FAB1A2.13558@lists.openembedded.org>
2021-03-01  1:39 ` Chen Qi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.