bootstrap-prefix: stop special USE flags for @system#44
Open
bartoldeman wants to merge 1 commit into
Open
Conversation
This change simplifies USE flag handling because all circular dependencies are resolved before the `emerge @system`. Since USE is then no longer exported in the script, it also makes sure USE is not set by the user before starting the bootstrap. This avoids a time-consuming rebuild of GCC during stage3 @world; in fact emerge @world does nothing, but I kept it for now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change simplifies USE flag handling because all circular dependencies are resolved before the
emerge @system.Since USE is then no longer exported in the script, it also makes sure USE is not set by the user before starting the bootstrap.
This avoids a time-consuming rebuild of GCC during stage3
@world; in factemerge @worlddoes nothing, but I kept it for now.Some additional analysis:
from reading the script I saw it does the following (I could not find it documented elsewhere in detail) for RAP specifically:
stage1: build a temporary portage and its dependencies manually
stage2: use that temporary portage to build GCC (+deps)
stage3: build
a) glibc
b) binutils
c) gcc
d) portage
e)
@systemf)
@world(+ deps)
up so far stage2 and 3a)-3d) use a long list of USE flags in
do_emerge_pkgs()(local myuse), and additionally a set of flags inDISABLE_USE; stage 3e) then only usesDISABLE_USE. This patch merges theDISABLE_USEflags intomyuseand stops usingDISABLE_USEin stage 3e).Circular dependencies:
there are 4 documented:
The
nghttp2one does not apply anymore since nghttp2 uses autotools again since March 2025:https://gitweb.gentoo.org/repo/gentoo.git/commit/net-libs/nghttp2?id=a7716d6ed1fbff2e7c27618aa2f7d24bc748f7d1
Of course a cmake user could return in the future. But cmake could then be resolved during stage3d)
The other ones already need to be resolved during stage 3b (binutils) and 3d (python), so no use still doing it during
@system.Comparison:
before:
after:
time for stage3 install (4 cores on a laptop): 5h32 vs 4h21.
I did not check this on non-RAP, it's possible I'm not aware of a gotcha somewhere.