build.py: Operate logfile handling at the task level
Previously, not all task output could end up in the logfile and
sub functions run using exec_func() calls would end up logging to
/dev/null. This is extrememly confusing for users who want to find
the output from a given task as there are several possible log files,
or it might not be there at all.
This patch changes exec_task() to redirect standard output/error
to the logfile along with any python logging output. This change is
applied for all python/shell tasks so it doesn't matter whether output
comes from os.system() calls or wherever, the logs are always correct.
This also removed the ton of log files previous code could generate
in ${T}, again making this simpler for users.
Based upon patches from Poky.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>