commit 6c3281a14 / set_context broken?
AFAICT, set_context in lib/bb/utils.py doesn't actually set the module-global _context variable, but just assigns to function-local variable by the same name. Hence it is effectively a no-op.
The python fix would be to add a "global _context" declaration, but since things have apparently worked for 5 years, perhaps one can simply delete set_context and remove the calls?
Rasmus
Quoted 7 lines · Rasmus Villemoes
AFAICT,
set_contextinlib/bb/utils.pydoesn't actually set the module-global_contextvariable, but just assigns to function-local variable by the same name. Hence it is effectively a no-op.The python fix would be to add a "global
_context" declaration, but since things have apparently worked for 5 years, perhaps one can simply deleteset_contextand remove the calls?
Ping.
Quoted 11 lines · Rasmus Villemoes
Quoted 8 lines · Rasmus Villemoes
AFAICT,
set_contextinlib/bb/utils.pydoesn't actually set the module-global_contextvariable, but just assigns to function-local variable by the same name. Hence it is effectively a no-op.The python fix would be to add a "global
_context" declaration, but since things have apparently worked for 5 years, perhaps one can simply
deleteset_contextand remove the calls?Ping.
I just had a quick look at the code and you're right, there is a bug there. It might explain some of the issues with memory resident bitbake and things not being quite reset properly at times. With it just covering os/bb/time, it probably isn't a huge deal but I'd prefer to fix the code as the API is meant to be generic.
Cheers,
Richard