diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-08-24 16:17:54 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-24 07:53:14 +0100 |
commit | 87d3a9685dd9613e4f6718031d4ebd9344b01c47 (patch) | |
tree | 72ba52a4249d63b1e9bc91c814f2903383eb5a4a /documentation/ref-manual/ref-release-process.xml | |
parent | 34ec08dc283590a25215689f41379412a6293668 (diff) | |
download | poky-87d3a9685dd9613e4f6718031d4ebd9344b01c47.tar.gz |
bitbake: parse/ast: ensure saved event handlers really do get restored
In finalize() we save event handlers, register the ones relevant to the
recipe being finalised, trigger events, and then restore the handlers so
that one recipe's custom handlers (actually implemented within a class
inherited by the recipe) do not affect other recipes. However, if an
exception occurs during parsing, the saved handlers were not being
restored. Use a try...finally block to ensure that the handlers are
always restored.
This issue became apparent since in OpenEmbedded-Core we have recently
introduced a find_intercepts() handler for the
bb.event.RecipePreFinalise event in image-postinst-intercepts.bbclass
that images and old-style SDK recipes will end up inheriting. So far it
doesn't seem that the the error has manifested itself in normal builds,
but when parsing OE-Core recipes in the OE layer index it has:
core-image-rt-* image recipes were parsed which in the default
configuration raise SkipRecipe. The next non-image recipe that is parsed
will trigger a real exception, because the find_intercepts() handler is
still registered and gets fired, but in the context of the new recipe
the POSTINST_INTERCEPTS_PATHS variable is not set, and the code in
find_intercepts() is written with the reasonable assumption that that
isn't possible given that the class itself sets a default, and thus it
fails.
(Bitbake rev: e5f1f8fa201774e0c3c554d59b277baa2128708f)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/ref-manual/ref-release-process.xml')
0 files changed, 0 insertions, 0 deletions