<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Feb 9, 2016 at 8:41 AM Mark Hatle &lt;<a href="mailto:mark.hatle@windriver.com">mark.hatle@windriver.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I&#39;m sending this as an RFC.  I know the patch works, but I think it highlights<br>
a potentially larger issue in the system.<br>
<br>
If we&#39;re processing data using shell pipes, the return code of a failed<br>
process may end up being lost -- avoiding the regular error capture when<br>
bitbake runs a task.<br>
<br>
In this particular case, while working to fix a bug in pseudo we made an<br>
error condition fatal (triggered an abort()), but buildhistory kept on<br>
processing ignoring any issues had occurred.<br>
<br>
Breaking up the processing into steps, things that &#39;could fail&#39;, and later<br>
processing steps that shouldn&#39;t fail will give us more of an opportunity to<br>
identify failures in the future and deal with them in a quicker manner,<br>
then having to investigate log files for messages.<br>
<br>
I&#39;m suspecting we should run a janitor exercise against oe-core looking for<br>
similar situations where we might be piping the data and potentially losing<br>
return codes in the process.<br>
<br>
Comments?<br></blockquote><div><br></div><div>Hmm, wonder if it&#39;d be worth adding the ability to inject extra &#39;set&#39; options to the start of all emitted shell tasks, and make it obey SHELL, so you could set SHELL=bash and set -o pipefail.</div></div></div>