mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
utils/brmake: drop use of unbuffer
When it was introduced in afdb545b28 (tools: new tool to filter the
output of make), brmake made use of unbuffer, so as to try and ensure
that no output would get lost between make printing it, and the logger
loop time-stamping it and storing it in the logfile, in case the user
would interrup the build (SIGINT, ^C)
However, unbuffer is missing in our reference build image (we could have
added it, but we missed the occasion to do so every time we updated the
reference build image).
Furthermore, the rationale for using unbuffer, although reasonable, is
not so practical: indeed, when the user hits Crtl-C, this is inherently
asynchronous, and they can't expect everything to be entirely cleanly
terminated, especially buffering. Using unbuffer is thus slightly
superfluous.
The timestamps will be slightly off because of buffering, but a build
generates so much output that this won't be a problem in practice.
Drop use of unbuffer.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
3761177a89
commit
3aacb38098
@@ -5,11 +5,6 @@
|
||||
main() {
|
||||
local ret start d h m mf
|
||||
|
||||
if ! which unbuffer >/dev/null 2>&1; then
|
||||
printf "you need to install 'unbuffer' (from package expect or expect-dev)\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
start=${SECONDS}
|
||||
|
||||
if [ -n "$BR2_DOCKER" ]; then
|
||||
@@ -18,7 +13,7 @@ main() {
|
||||
docker=()
|
||||
fi
|
||||
|
||||
( exec 2>&1; unbuffer "${docker[@]}" make "${@}"; ) \
|
||||
( exec 2>&1; "${docker[@]}" make "${@}"; ) \
|
||||
> >( while read -r line; do
|
||||
printf "%(%Y-%m-%dT%H:%M:%S)T %s\n" -1 "${line}"
|
||||
done \
|
||||
|
||||
Reference in New Issue
Block a user