From c639bc2abdfc15a29559538c846103894ff91c83 Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Wed, 20 Jan 2021 12:38:41 +0100 Subject: [PATCH 1/3] Fix and improve some depext messages --- master_changes.md | 1 + src/client/opamSolution.ml | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/master_changes.md b/master_changes.md index a242466fad1..5a6e3562a94 100644 --- a/master_changes.md +++ b/master_changes.md @@ -69,6 +69,7 @@ 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] ## Sandbox * Fix the conflict with the environment variable name used by dune [#4535 @smorimoto - fix ocaml/dune#4166] diff --git a/src/client/opamSolution.ml b/src/client/opamSolution.ml index 100c45632ab..ec37e8dbbcd 100644 --- a/src/client/opamSolution.ml +++ b/src/client/opamSolution.ml @@ -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." + "The bypass of system package%s %s has been registered in this \ + switch. You can 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 = @@ -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 *) From 7ef95c953ca076ce4407aa0cabd9658a6e9cc678 Mon Sep 17 00:00:00 2001 From: "R. Boujbel" Date: Mon, 8 Mar 2021 16:59:57 +0100 Subject: [PATCH 2/3] update changes --- master_changes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/master_changes.md b/master_changes.md index 5a6e3562a94..2650a0795a6 100644 --- a/master_changes.md +++ b/master_changes.md @@ -70,6 +70,7 @@ New option/command/subcommand are prefixed with ◈. * 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] + * 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] From 3a8241f89400bce9bba5bfb1a7db9432cb186b84 Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Fri, 16 Apr 2021 08:59:30 +0200 Subject: [PATCH 3/3] Improve clarity of depext-bypass message (thanks @dra27) --- src/client/opamSolution.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/opamSolution.ml b/src/client/opamSolution.ml index ec37e8dbbcd..a1a2c0b8651 100644 --- a/src/client/opamSolution.ml +++ b/src/client/opamSolution.ml @@ -386,8 +386,8 @@ 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 %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