event: Fix event handlers to raise SkipPackage

If an event handler triggers a SkipPackage event, we really want that
event to be received and processed by the higher code levels. Currently
it was getting caught and ignored which was leading to recipes
being present when they clearly shouldn't have been.

In general this exception catching looks to be doing the wrong thing. It
was introduced in
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/bitbake/lib/bb/event.py?id=37cb4cc02b2e2b6c338c5943747e0a1ef15176b3
but we likely want exceptions to pass through to the higher layers.

This patch therefore removes that code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cookerdata: Improve error handling

If we see errors during parsing, firstly its bad to show a traceback
for an expansion error so lets suppress this.

Secondly, raise a BBHandledException instead of a SystemExit to show
we've informed the user about the condition (printing a traceback in the
default unknown case).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
event.py: Allow passthrough of BBHandledException events

We need BBHandledException events to be passed through to the higher
layers, they don't need addition of any traceback since they've already
been reported to the user.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
event: Add SkipRecipe event to replace SkipPackage

In the depths of time we were rather confused about naming. bb files
are recipes, the event to skip parsing them should be SkipRecipe,
not SkipPackage. This changes bitbake to use the better name but
leaves the other around for now. We can therefore start removing
references to it from the metadata.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bb.fatal: Raise a BBHandledException instead of exiting

With new bitbake UIs having the cooker exit at 'random' points
in the codebase is problematic. This patch raises an exception
which matches the situation instead.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
build/utils: Fix broken exception handling

Checking for explicit exception names is bad, we also want to be able top
rely on inheritance. Fix these checks to be part of the real except clauses
so SkipPackage is recognised as being inherited from SkipRecipe.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
siggen: Print warning about tainted tasks

The big warning printed when people use -f is easily ignored/forgotten.
To raise user awareness, print a warning any time we include a tainted
stamp file into a build instead.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>