commit:     715db699226245f555867d8f3774f1f9343f2c8a
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 21 13:27:55 2024 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Aug 21 13:27:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=715db699

scripts/bootstrap-prefix: use DISABLE_USE for circular deps

Use set of USE-flags that are necessary to break circular deps, and
reduce more to just weed unnecessary dependencies.  Use DISABLE_USE for
the circular ones so they can be properly reused.

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

 scripts/bootstrap-prefix.sh | 38 ++++++++++++++++++++------------------
 1 file changed, 20 insertions(+), 18 deletions(-)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 98c2282e05..888023efc5 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1805,11 +1805,26 @@ do_emerge_pkgs() {
                done
                [[ -n ${pvdb} ]] && continue
 
+               # avoid many deps at this stage which aren't necessary, e.g.
+               # having a bash without readline is OK, we're not using the
+               # shell interactive
                local myuse=(
                        "${DISABLE_USE[@]}"
-                       bootstrap
-                       clang
-                       internal-glib
+                       "-acl"
+                       "-berkdb"
+                       "-fortran"            # gcc
+                       "-gdbm"
+                       "-libcxx"
+                       "-nls"
+                       "-pcre"
+                       "-python"
+                       "-qmanifest"          # portage-utils
+                       "-qtegrity"           # portage-utils
+                       "-readline"           # bash
+                       "-sanitize"
+                       "bootstrap"
+                       "clang"
+                       "internal-glib"
                )
                local 
override_make_conf_dir="${PORTAGE_OVERRIDE_EPREFIX}${MAKE_CONF_DIR#"${ROOT}"}"
 
@@ -2450,8 +2465,7 @@ bootstrap_stage3() {
        # e.g. bug #901101, this is a reduced (e.g. as minimal as possible)
        # set of DISABLE_USE, to set the stage for solving circular
        # dependencies, such as:
-       # - nghttp2 -> cmake -> curl -> nghttp2
-       export USE="-git -crypt -http2"
+       export USE="${DISABLE_USE[*]}"
 
        # Portage should figure out itself what it needs to do, if anything.
        local eflags=( "--deep" "--update" "--changed-use" "@system" )
@@ -2561,28 +2575,16 @@ set_helper_vars() {
 
        # USE-flags to disable during bootstrap for they produce
        # unnecessary, or worse: circular deps #901101, #936629
+       # - nghttp2 -> cmake -> curl -> nghttp2  (http2)
        DISABLE_USE=(
-               "-acl"
-               "-berkdb"
                "-crypt"
                "-curl_quic_openssl"  # curl
-               "-fortran"            # gcc
-               "-gdbm"
                "-git"
                "-http2"              # curl
                "-http3"              # curl
-               "-libcxx"
-               "-nls"
-               "-pcre"
-               "-python"
-               "-qmanifest"          # portage-utils
-               "-qtegrity"           # portage-utils
                "-quic"               # curl
-               "-readline"           # bash
-               "-sanitize"
        )
 
-
        export MAKE CONFIG_SHELL
 }
 

Reply via email to