[OE-core] [RFC][PATCH] Resolve an issue when using pipes to process data

Christopher Larson clarson at kergoth.com
Thu Feb 11 16:00:13 UTC 2016


On Tue, Feb 9, 2016 at 8:41 AM Mark Hatle <mark.hatle at windriver.com> wrote:

> I'm sending this as an RFC.  I know the patch works, but I think it
> highlights
> a potentially larger issue in the system.
>
> If we're processing data using shell pipes, the return code of a failed
> process may end up being lost -- avoiding the regular error capture when
> bitbake runs a task.
>
> In this particular case, while working to fix a bug in pseudo we made an
> error condition fatal (triggered an abort()), but buildhistory kept on
> processing ignoring any issues had occurred.
>
> Breaking up the processing into steps, things that 'could fail', and later
> processing steps that shouldn't fail will give us more of an opportunity to
> identify failures in the future and deal with them in a quicker manner,
> then having to investigate log files for messages.
>
> I'm suspecting we should run a janitor exercise against oe-core looking for
> similar situations where we might be piping the data and potentially losing
> return codes in the process.
>
> Comments?
>

Hmm, wonder if it'd be worth adding the ability to inject extra 'set'
options to the start of all emitted shell tasks, and make it obey SHELL, so
you could set SHELL=bash and set -o pipefail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160211/7bd40cb3/attachment-0002.html>


More information about the Openembedded-core mailing list