Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and improve some depext messages #4591

Merged
merged 3 commits into from
Apr 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ New option/command/subcommand are prefixed with ◈.
* Handle macport variants [#4509 @rjbou - fix #4297]
* Always upgrade all the installed packages when installing a new package on Archlinux [#4556 @kit-ty-kate]
* Handle some additional environment variables (`OPAMASSUMEDEPEXTS`, `OPAMNODEPEXTS`) [#4587 @AltGr]
* Improve messages to hint that answering `no` doesn't abort installation [@AltGr]
rjbou marked this conversation as resolved.
Show resolved Hide resolved
* Improve messages to hint that answering `no` doesn't abort installation [#4591 @AltGr]

## Sandbox
* Fix the conflict with the environment variable name used by dune [#4535 @smorimoto - fix ocaml/dune#4166]
Expand Down
10 changes: 6 additions & 4 deletions src/client/opamSolution.ml
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,14 @@ let parallel_apply t
(if bypass <> !bypass_ref then
(let spkgs = OpamSysPkg.Set.Op.(bypass -- !bypass_ref) in
OpamConsole.note
"The bypass of system package %s has been registered in this switch. You \
can use `opam option depext-bypass-=%s' to revert."
"Requirement for system package%s %s overridden in this switch. Use \
`opam option depext-bypass-=%s' to revert."
(if OpamSysPkg.Set.cardinal spkgs > 1 then "s" else "")
(OpamStd.Format.pretty_list
(List.map OpamSysPkg.to_string
(OpamSysPkg.Set.elements spkgs))));
(OpamSysPkg.Set.elements spkgs)))
(OpamStd.List.concat_map "," OpamSysPkg.to_string
(OpamSysPkg.Set.elements spkgs)));
bypass_ref := bypass;
invariant_ref := invariant;
let switch_config =
Expand Down Expand Up @@ -1106,7 +1108,7 @@ let install_depexts ?(force_depext=false) ?(confirm=true) t packages =
else if
not confirm || OpamConsole.confirm
"Let opam run your package manager to install the required system \
packages?"
packages?\n(answer 'n' for other options)"
then
try
OpamSysInteract.install sys_packages; (* handles dry_run *)
Expand Down