Conversation
The `--jobs` parameter that some scripts defined was not used anywhere
in jenkins or mantle. So the value of the parameter always ended up
being equal to `${NUM_JOBS}` set by `common.sh`. Also, even if the
`--jobs` parameter was used for some script, that script usually
didn't forward the jobs value to other scripts, so the other scripts
ended up using `${NUM_JOBS}` again. Also, the `${FLAGS_jobs}` variable
was used by some functions in the build library, and those functions
were sometimes invoked by scripts that didn't define the
`${FLAGS_jobs}` variable. It is tedious to track which script should
actually define the parameter, and where it should be forwarded.
Just get rid of this half-working pretense. If you want to affect how
many jobs `emerge` uses, export the `NUM_JOBS` environment variable
before calling any script.
For `EMERGE_FLAGS` and `REBUILD_FLAGS` we unconditionally specify the
`--jobs` flag's value to `${NUM_JOBS}` because they are passed to
`emerge`. On the other hand we drop the `--jobs` parameter from the
`UPDATE_ARGS` variable, because this variable passed to `setup_board`
or `update_chroot`, which don't have this flag any more.
dongsupark
approved these changes
May 4, 2021
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.
The
--jobsparameter that some scripts defined was not used anywherein jenkins or mantle. So the value of the parameter always ended up
being equal to
${NUM_JOBS}set bycommon.sh. Also, even if the--jobsparameter was used for some script, that script sometimesdidn't forward the jobs value to other scripts, so the other scripts
ended up using
${NUM_JOBS}again. Also, the${FLAGS_jobs}variablewas used by some functions in the build library, and those functions
were sometimes invoked by scripts that didn't define the
${FLAGS_jobs}variable. It is tedious to track which script shouldactually define the parameter, and where it should be forwarded.
Just get rid of this half-working pretense. If you want to affect how
many jobs
emergeuses, export theNUM_JOBSenvironment variablebefore calling any script.
For
EMERGE_FLAGSandREBUILD_FLAGSwe unconditionally specify the--jobsflag's value to${NUM_JOBS}because they are passed toemerge. On the other hand we drop the--jobsparameter from theUPDATE_ARGSvariable, because this variable passed tosetup_boardor
update_chroot, which don't have this flag any more.Also make sure that NUM_JOBS is a positive integer.