methodpool: Conflicting methodnames should be a fatal error

When this error occurs, the build should stop, not continue uninterrupted.

[YOCTO #4460]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
methodpool: Retire it, remove global method scope

Having a global method scope confuses users and with the introduction
of parallel parsing, its not even possible to correctly detect conflicting
functions. Rather than try and fix that, its simpler to retire the global
method scope and restrict functions to those locations they're defined
within. This is more what users actually expect too.

If we remove the global function scope, the need for methodpool is reduced
to the point we may as well retire it. There is some small loss of caching
of parsed functions but timing measurements so the impact to be neglibile
in the overall parsing time.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cooker.py: Remove global scope class event handlers

Its confusing when an event handler in for example a bbclass receives
events for a recipe which doesn't use the class. This is due to the
class event handlers having confusing scope. Worse, the issue is not
deterministic and the events a handler will see depends on the parse
order.

To avoid these issues, remove the class event handler global scope
and only have class handlers recieve events for recipes using the
class.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
event: Drop Handled/NotHandled status return values

These have long since been deprecated, lets remove them.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cooker/cookerdata/utils: Improve context management

The current execution context management for bitbake is ugly and the
use of a global variable is nasty. Fixing that is hard, however we
can improve things to start to establish an API for accessing
and changing that context.

This patch also adds in an explicit reset of the context when we reparse
the configuration data which starts to improve the lifecycle of the data
in setups like hob.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cooker/cookerdata/event: Improve class handlers management

Similarly to the execution context changes, establish better lifetime
management API of the class event handlers.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2: Fix missing assignment

The assignment to True was missing from the code, well spotted Saul!

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cooker/cookerdata: Improve configuration object handling

Originally it seemed like a good idea to keep the parameters around. Having
seen this in real life use, its incorrect, we should pull all the data we need
into the cooker's configuguration and then use this to build the datastore.

Being able to just build the datastore from the parameters seemed like a good
idea but having a dummy cooker configuration object is now looking like
the better option.

This also fixes failures in hob since the parseFiles command can call
into cooker directly now and reset the configuration prefiles and postfiles
at will, rather than the indirect calls before which were breaking the datastore
(e.g. BBPATH wasn't set).

The cleanup this allows in tinfoil illustrates how this change makes more sense.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake-layers: fix show-appends and flatten for recent cooker changes

Fixes the show-appends and flatten subcommands for recent refactoring in
cooker.

[YOCTO #4536]
[YOCTO #4535]

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
build: Avoid empty promises

The "see xxx for further information" is misleading since it is just
the same information. Clarify just to mention the that this is the location
of the logfile without any empty promise.

[YOCTO #4343]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cooker/cookerdata: Fix up event handling for hob

The init function call was clobbering data hob relies on injecting, fix
this so the data injected by hob isn't overwritten.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Merge branch 'master' into wmat