commit: f00e536795e94f1f4cab99c355d6dd25481599f3
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 22 08:45:20 2025 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Dec 22 08:45:20 2025 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=f00e5367
scripts/bootstrap-prefix: become quieter in stage2 and 3
Use --jobs=1 to trigger Portage's more quiet mode. The amount of
logging is just swamping the terminal, and there's rarely a need for it,
given that on error Portage dumps the full output.
It is possible to also enable parallel mode this way, but there are some
dependency issues, and besides, there's a lot of single order required
here, so it doesn't pay off that much.
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
scripts/bootstrap-prefix.sh | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 72fd7bc4f8..e364b2170e 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -3008,9 +3008,7 @@ EOF
read -r -p "How many parallel make jobs do you want? [${tcpu}] " ans
case "${ans}" in
"")
- # bug 966647: retain MAKEOPTS for phase runs
- [[ -z ${SETUP_ENV_ONLY} || -z ${MAKEOPTS} ]] && \
- MAKEOPTS="-j${tcpu}"
+ ans="${tcpu}"
;;
*)
if [[ ${ans} -le 0 ]] ; then
@@ -3035,10 +3033,18 @@ EOF
echo "(are you?)"
fi
fi
- MAKEOPTS="-j${ans}"
;;
esac
- export MAKEOPTS
+ # bug 966647: retain MAKEOPTS for phase runs
+ if [[ -z ${SETUP_ENV_ONLY} ]] ; then
+ MAKEOPTS="-j${ans}"
+ # technically could consider using --jobs ${ans} --load-average
${ans}.5
+ # but there are some bugs in dependencies that way; just use a
+ # single job to make the output quieter, on error Portage shows
+ # the full buildlog
+ EMERGE_DEFAULT_OPTS="--jobs 1"
+ export MAKEOPTS EMERGE_DEFAULT_OPTS
+ fi
#32/64 bits, multilib
local candomultilib=no
@@ -3566,10 +3572,10 @@ if [[ ${CHOST} == *-linux-* ]] ; then
# x86_64-pc-linux-ubuntu16
# I choose the latter because it is compatible with most
# UNIX vendors and it allows to fit RAP into platform
- dist=$(lsb_release -si)
- rel=$(lsb_release -sr)
+ dist=$(lsb_release -si 2>/dev/null)
+ rel=$(lsb_release -sr 2>/dev/null)
if [[ -z ${dist} ]] || [[ -z ${rel} ]] ; then
- source /etc/os-release # this may fail if the file isn't there
+ source /etc/os-release 2>/dev/null # accept when file isn't
there
[[ -z ${dist} ]] && dist=${ID}
[[ -z ${dist} ]] && dist=${NAME}
[[ -z ${rel} ]] && rel=${VERSION_ID}