From 3aacb38098864eba4f0af21e947cb9cbf2cf6dbe Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Tue, 18 Feb 2025 08:57:36 +0100 Subject: [PATCH] utils/brmake: drop use of unbuffer When it was introduced in afdb545b2847 (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 Cc: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Arnout Vandecappelle --- utils/brmake | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/utils/brmake b/utils/brmake index 4756016a0c..e5437d8f2c 100755 --- a/utils/brmake +++ b/utils/brmake @@ -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 \