Skip to content

Commit

Permalink
Merge pull request ocaml#5056 from rjbou/init-config-fx
Browse files Browse the repository at this point in the history
Fix 'opam init' and 'opam init --reinit' when the `jobs` variable has been set in the opamrc or the current config
  • Loading branch information
rjbou committed Apr 22, 2022
1 parent 781443f commit ec94c24
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ New option/command/subcommand are prefixed with ◈.

## Init
*
* Run the sandbox check in the temporary directory [#4787 @dra27 - fix #4783]
* [BUG] Fix `opam init` and `opam init --reinit` when the `jobs` variable has been set in the opamrc or the current config. [#5056 @rjbou]

## Config report
*
Expand Down Expand Up @@ -169,3 +171,24 @@ New option/command/subcommand are prefixed with ◈.

## Security fixes
*

# API updates
## opam-client
* `OpamStd.ABSTRACT`: add `compare` and `equal`, that added those functions to `OpamCLIVersion` [#4918 @rjbou]
* `OpamConfigCommand`: add a labelled argument `no_switch` to `exec` [#4957 @kit-ty-kate]
* `OpamClient`: fix `update_with_init_config`, when ``jobs` was set in `init_config`, it dropped rest of `config` update [#5056 @rjbou]
## opam-repository
* `OpamRepositoryConfig`: add in config record `repo_tarring` field and as an argument to config functions, and a new constructor `REPOSITORYTARRING` in `E` environment module and its access function [#5015 @rjbou]
## opam-state
## opam-solver
* `OpamCudf`: Change type of `conflict_case.Conflict_cycle` (`string list list` to `Cudf.package action list list`) and `cycle_conflict`, `string_of_explanations`, `conflict_explanations_raw` types accordingly [#4039 @gasche]
* `OpamCudf`: add `conflict_cycles` [#4039 @gasche]
## opam-format
* `OpamStd.ABSTRACT`: add `compare` and `equal`, that added those functions to `OpamSysPkg` and `OpamVariable` [#4918 @rjbou]
* Add OpamPackage.Version.default returning the version number used when no version is given for a package [#4949 @kit-ty-kate]
* Add `OpamPath.Switch.man_dirs` [#4915 @rjbou]
## opam-core
* OpamSystem: avoid calling Unix.environment at top level [#4789 @hannesm]
* `OpamStd.ABSTRACT`: add `compare` and `equal`, that added those functions to `OpamFilename`, `OpamHash`, `OpamStd`, `OpamStd`, `OpamUrl`, and `OpamVersion` [#4918 @rjbou]
* `OpamHash`: add `sort` from strongest to weakest kind
* `OpamSystem.real_path`: Remove the double chdir trick on OCaml >= 4.13.0 [#4961 @kit-ty-kate]
4 changes: 2 additions & 2 deletions src/client/opamClient.ml
Original file line number Diff line number Diff line change
Expand Up @@ -752,9 +752,9 @@ let update_with_init_config ?(overwrite=false) config init_config =
else conf
in
config |>
match I.jobs init_config with
(match I.jobs init_config with
| Some j -> setifnew C.jobs C.with_jobs j
| None -> fun c -> c |>
| None -> fun c -> c) |>
setifnew C.dl_tool C.with_dl_tool_opt (I.dl_tool init_config) |>
setifnew C.dl_jobs C.with_dl_jobs
(OpamStd.Option.default OpamStateConfig.(default.dl_jobs)
Expand Down

0 comments on commit ec94c24

Please sign in to comment.