Skip to content

Commit f00e536

Browse files
committed
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 <[email protected]>
1 parent c0bbba0 commit f00e536

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

scripts/bootstrap-prefix.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3008,9 +3008,7 @@ EOF
30083008
read -r -p "How many parallel make jobs do you want? [${tcpu}] " ans
30093009
case "${ans}" in
30103010
"")
3011-
# bug 966647: retain MAKEOPTS for phase runs
3012-
[[ -z ${SETUP_ENV_ONLY} || -z ${MAKEOPTS} ]] && \
3013-
MAKEOPTS="-j${tcpu}"
3011+
ans="${tcpu}"
30143012
;;
30153013
*)
30163014
if [[ ${ans} -le 0 ]] ; then
@@ -3035,10 +3033,18 @@ EOF
30353033
echo "(are you?)"
30363034
fi
30373035
fi
3038-
MAKEOPTS="-j${ans}"
30393036
;;
30403037
esac
3041-
export MAKEOPTS
3038+
# bug 966647: retain MAKEOPTS for phase runs
3039+
if [[ -z ${SETUP_ENV_ONLY} ]] ; then
3040+
MAKEOPTS="-j${ans}"
3041+
# technically could consider using --jobs ${ans} --load-average ${ans}.5
3042+
# but there are some bugs in dependencies that way; just use a
3043+
# single job to make the output quieter, on error Portage shows
3044+
# the full buildlog
3045+
EMERGE_DEFAULT_OPTS="--jobs 1"
3046+
export MAKEOPTS EMERGE_DEFAULT_OPTS
3047+
fi
30423048

30433049
#32/64 bits, multilib
30443050
local candomultilib=no
@@ -3566,10 +3572,10 @@ if [[ ${CHOST} == *-linux-* ]] ; then
35663572
# x86_64-pc-linux-ubuntu16
35673573
# I choose the latter because it is compatible with most
35683574
# UNIX vendors and it allows to fit RAP into platform
3569-
dist=$(lsb_release -si)
3570-
rel=$(lsb_release -sr)
3575+
dist=$(lsb_release -si 2>/dev/null)
3576+
rel=$(lsb_release -sr 2>/dev/null)
35713577
if [[ -z ${dist} ]] || [[ -z ${rel} ]] ; then
3572-
source /etc/os-release # this may fail if the file isn't there
3578+
source /etc/os-release 2>/dev/null # accept when file isn't there
35733579
[[ -z ${dist} ]] && dist=${ID}
35743580
[[ -z ${dist} ]] && dist=${NAME}
35753581
[[ -z ${rel} ]] && rel=${VERSION_ID}

0 commit comments

Comments
 (0)