commit:     e3ce0dbb0170eb5d3c3e88f7b5d4e304cd62bb48
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 20 18:54:36 2024 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Aug 20 18:54:36 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=e3ce0dbb

scripts/bootstrap-prefix: first complete @system before using USE-flags

Complete @system before trying to set default USE-flags.
This may cause re-compilations but is necessary to avoid circular deps
e.g. with curl, so take the extra step, much like how in the past we
would emerge -e @world after @system.

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

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

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index b4e8f75841..d12440fd8c 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -2451,7 +2451,7 @@ bootstrap_stage3() {
        export USE="${DISABLE_USE[*]}"
 
        # Portage should figure out itself what it needs to do, if anything.
-       local eflags=( "--deep" "--update" "--changed-use" "@system" )
+       local eflags=( "@system" )
        einfo "running emerge ${eflags[*]}"
        estatus "stage3: emerge ${eflags[*]}"
        emerge --color n -v "${eflags[@]}" || return 1
@@ -2461,6 +2461,16 @@ bootstrap_stage3() {
        # from happening, add to the worldfile #936629#c5
        emerge --color n --noreplace sys-devel/binutils
 
+       # now try and get things in the way they should be according to the
+       # default USE-flags
+       unset USE
+
+       # Portage should figure out itself what it needs to do, if anything.
+       eflags=( "--deep" "--update" "--changed-use" "@world" )
+       einfo "running emerge ${eflags[*]}"
+       estatus "stage3: emerge ${eflags[*]}"
+       emerge --color n -v "${eflags[@]}" || return 1
+
        # Remove anything that we don't need (compilers most likely)
        einfo "running emerge --depclean"
        estatus "stage3: emerge --depclean"

Reply via email to