commit:     43b97bdd5d0966f19b20f84df649590c8f410955
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 30 09:40:22 2025 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Nov 30 09:40:22 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=43b97bdd

scripts/bootstrap-prefix: retain MAKEOPTS over stage runs

Closes: https://bugs.gentoo.org/966647
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 scripts/bootstrap-prefix.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index e2b9edcc8d..5177ec093b 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -2781,6 +2781,7 @@ EOF
                CPATH \
                LIBRARY_PATH \
        ; do
+               [[ -n ${SETUP_ENV_ONLY} ]] && continue  # we already checked 
this
                # starting on purpose a shell here iso ${!flag} because I want
                # to know if the shell initialisation files trigger this
                # note that this code is so complex because it handles both
@@ -3034,7 +3035,9 @@ EOF
        read -r -p "How many parallel make jobs do you want? [${tcpu}] " ans
        case "${ans}" in
                "")
-                       MAKEOPTS="-j${tcpu}"
+                       # bug 966647: retain MAKEOPTS for phase runs
+                       [[ -z ${SETUP_ENV_ONLY} || -z ${MAKEOPTS} ]] && \
+                               MAKEOPTS="-j${tcpu}"
                        ;;
                *)
                        if [[ ${ans} -le 0 ]] ; then

Reply via email to