[Buildroot] [PATCH] utils/brmake: filter output for parallel build

Marcus Hoffmann buildroot at bubu1.eu
Fri Oct 17 13:49:09 UTC 2025


Hi Vincent,

On 10/13/25 20:04, Vincent Stehlé wrote:
> On Fri, Oct 10, 2025 at 03:47:32PM +0200, Marcus Hoffmann via buildroot wrote:
> (grep --line-buffered option)
>> Ah, this makes sense, I think I have notices this delay here mostly in CI,
>> where sometimes there's no output for minutes. This seems to improve that.
> 
> Hi Marcus,
> 
> This change of behaviour in your CI messages output rate is an unexpected side
> effect!
> 
> I think that without any option, grep and sed adapt their output buffering
> policy automatically in the same way, depending on what they are connected to (a
> terminal or something else).
> 
> Now that sed is the last program in the pipeline, I would expect that it would
> still buffer its output in your CI case, as grep was doing.

I see. So either sed is behaving slightly differently from grep here or 
this was just the placebo effect at work here. :)

> 
> If you fancy, you could try to add the "--unbuffered" option to sed command line
> and see if that changes its behaviour in your CI:
> 
>    |sed --unbuffered -E 's/^([0-9T:-]{19}) [[:print:]]*(.*>>> )/\1 \2/'
> 

I tested this side-by-side (with or and without unbuffered sed) now and 
this definitely makes a significant difference in output reactivity in 
our gitlab CI. But as you said, this is kind of unrelated to the actual 
change you wanted to make. (I have another comment on that as well, but 
I'll send that in a separate email).

>>
>> This should probably mentioned in the commit message.
> 
> The intention was to avoid any visible change in term of buffering; sed should
> have replaced grep in that sense.

I see, maybe still mentioning why this is needed for grep here, might be 
helpful for readers of the code/commit message.>
> Best regards,
> Vincent.
Best,
Marcus


More information about the buildroot mailing list