diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-14 12:48:37 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-15 08:35:07 +0100 |
commit | ff6d458f9ad4e2aed24997aea15ec930b0915c26 (patch) | |
tree | 7fe4fb51835c338eb1fce3cf08b6486d3bd889c8 /bitbake/lib/bb/event.py | |
parent | 27fa181897b54ee5a6151faf836df90a60163292 (diff) | |
download | poky-ff6d458f9ad4e2aed24997aea15ec930b0915c26.tar.gz |
bitbake: parse/ast, event: Ensure we reset registered handlers during parsing
When parsing, we should reset the event handlers we registered when
done. If we don't do this, parse order may change the build, depending
on what the parse handlers do to the metadata.
This issue showed up as a basehash change:
ERROR: Bitbake's cached basehash does not match the one we just generated (
/media/build1/poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb.do_unpack)!
This is due to the eventhandler in nativesdk.bbclass being run, despite
this .bb file not inheriting nativesdk.bbclass. The parse order was
different between the signature generation and the main multithreaded
parse.
Diffsigs showed:
bitbake-diffsigs 1.0-r2.do_unpack.sigbasedata.*
basehash changed from 887d1c25962156cae859c1542e69a8d7 to cb84fcfafe15fc92fb7ab8c6d97014ca
Variable PN value changed from 'nativesdk-buildtools-perl-dummy' to '${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}'
with PN being set by the event handler.
(Bitbake rev: 0219271d4130c1f4cf071c7577a4101c54c04921)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/event.py')
-rw-r--r-- | bitbake/lib/bb/event.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index 6fb37128ea..9b4a4f97b5 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py | |||
@@ -227,6 +227,13 @@ def remove(name, handler): | |||
227 | """Remove an Event handler""" | 227 | """Remove an Event handler""" |
228 | _handlers.pop(name) | 228 | _handlers.pop(name) |
229 | 229 | ||
230 | def get_handlers(): | ||
231 | return _handlers | ||
232 | |||
233 | def set_handlers(handlers): | ||
234 | global _handlers | ||
235 | _handlers = handlers | ||
236 | |||
230 | def set_eventfilter(func): | 237 | def set_eventfilter(func): |
231 | global _eventfilter | 238 | global _eventfilter |
232 | _eventfilter = func | 239 | _eventfilter = func |