From 6edfcd38b180fe3f3be264de1229c87d2f1f68d6 Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Tue, 8 Feb 2022 13:27:39 +0100 Subject: [PATCH] Actions summary: print as part of the question --- master_changes.md | 1 + src/client/opamSolution.ml | 25 ++++-------- src/solver/opamActionGraph.ml | 9 +++++ src/solver/opamActionGraph.mli | 4 ++ src/solver/opamSolver.ml | 54 ++++++++++++-------------- tests/reftests/avoid-version.test | 2 - tests/reftests/cudf-preprocess.test | 5 --- tests/reftests/init.test | 1 - tests/reftests/legacy-git.test | 13 ------- tests/reftests/legacy-local.test | 14 ------- tests/reftests/opamrt-big-upgrade.test | 2 - tests/reftests/opamrt-dep-cycle.test | 5 --- tests/reftests/opamrt-reinstall.test | 13 ------- tests/reftests/orphans.test | 7 ---- tests/reftests/remove.test | 3 -- tests/reftests/upgrade-format.test | 2 - tests/reftests/var-option.test | 1 - 17 files changed, 47 insertions(+), 114 deletions(-) diff --git a/master_changes.md b/master_changes.md index 03cb48f4847..bf3fa594c32 100644 --- a/master_changes.md +++ b/master_changes.md @@ -18,6 +18,7 @@ users) * Add cli 2.2 handling [#4853 @rjbou] * --no-depexts is the default in CLI 2.0 mode [#4908 @dra27] * [BUG] Fix behaviour on closed stdout/stderr [#4901 @altgr - fix #4216] + * Refresh the actions list output, now sorted by action/package rather than dependency [#5045 @kit-ty-kate @AltGr - fix #5041] ## Plugins * diff --git a/src/client/opamSolution.ml b/src/client/opamSolution.ml index 0c08eec05f5..48f54e8d814 100644 --- a/src/client/opamSolution.ml +++ b/src/client/opamSolution.ml @@ -962,18 +962,13 @@ let simulate_new_state state t = the packages in the user request *) let confirmation ?ask requested solution = OpamCoreConfig.answer_is_yes () || - match ask with - | Some false -> true - | Some true -> OpamConsole.confirm "Do you want to continue?" - | None -> - let open PackageActionGraph in - let solution_packages = - fold_vertex (fun v acc -> - OpamPackage.Name.Set.add (OpamPackage.name (action_contents v)) acc) - solution - OpamPackage.Name.Set.empty in - OpamPackage.Name.Set.equal requested solution_packages - || OpamConsole.confirm "Do you want to continue?" + ask = Some false || + let solution_packages = + OpamPackage.names_of_packages (OpamSolver.all_packages solution) + in + ask <> Some true && OpamPackage.Name.Set.equal requested solution_packages || + let stats = OpamSolver.stats solution in + OpamConsole.confirm "\nProceed with %s?" (OpamSolver.string_of_stats stats) let run_hook_job t name ?(local=[]) ?(allow_stdout=false) w = let shell_env = OpamEnv.get_full ~set_opamroot:true ~set_opamswitch:true ~force_path:true t in @@ -1158,7 +1153,6 @@ let apply ?ask t ~requested ?add_roots ?(assume_built=false) t, Nothing_to_do else ( (* Otherwise, compute the actions to perform *) - let stats = OpamSolver.stats solution in let show_solution = ask <> Some false in let action_graph = OpamSolver.get_atomic_action_graph solution in let new_state = simulate_new_state t action_graph in @@ -1194,12 +1188,9 @@ let apply ?ask t ~requested ?add_roots ?(assume_built=false) ~requested ~reinstall:(Lazy.force t.reinstall) ~available:(Lazy.force t.available_packages) solution; - let total_actions = sum stats in - if total_actions >= 2 then - OpamConsole.msg "===== %s =====\n" (OpamSolver.string_of_stats stats); ); if not OpamClientConfig.(!r.show) && - (download_only || confirmation ?ask requested action_graph) + (download_only || confirmation ?ask requested solution) then ( let t = install_depexts t @@ OpamPackage.Set.inter diff --git a/src/solver/opamActionGraph.ml b/src/solver/opamActionGraph.ml index 8124a6f46de..993083fc74b 100644 --- a/src/solver/opamActionGraph.ml +++ b/src/solver/opamActionGraph.ml @@ -31,6 +31,15 @@ let name_of_action = function | `Build _ -> "build" | `Fetch _ -> "fetch" +let noun_of_action = function + | `Remove _ -> "removal", "removals" + | `Install _ -> "installation", "installations" + | `Change (`Up,_,_) -> "upgrade", "upgrades" + | `Change (`Down,_,_) -> "downgrade", "downgrades" + | `Reinstall _ -> "recompilation", "recompilations" + | `Build _ -> "build", "builds" + | `Fetch _ -> "fetch", "fetches" + let symbol_of_action = let open OpamConsole in function diff --git a/src/solver/opamActionGraph.mli b/src/solver/opamActionGraph.mli index 39815cd9cce..d8152065e67 100644 --- a/src/solver/opamActionGraph.mli +++ b/src/solver/opamActionGraph.mli @@ -69,3 +69,7 @@ val name_of_action: 'a action -> string (** Colorise string according to the action *) val action_color: 'a action -> string -> string + +(** Returns a noun corresponding to the action name, singular and plural + forms *) +val noun_of_action: 'a action -> string * string diff --git a/src/solver/opamSolver.ml b/src/solver/opamSolver.ml index 3505a745272..183073e6e51 100644 --- a/src/solver/opamSolver.ml +++ b/src/solver/opamSolver.ml @@ -685,35 +685,31 @@ let stats sol = let string_of_stats stats = let utf = (OpamConsole.utf8 ()) in - let stats = [ - stats.s_install; - stats.s_reinstall; - stats.s_upgrade; - stats.s_downgrade; - stats.s_remove; + let titles_stats = [ + `Remove (), stats.s_remove; + `Change (`Down,(),()), stats.s_downgrade; + `Reinstall (), stats.s_reinstall; + `Change (`Up,(),()), stats.s_upgrade; + `Install (), stats.s_install; ] in - let titles = - List.map - (fun a -> - let s = OpamActionGraph.action_strings a in - if utf then OpamActionGraph.action_color a s else s) - [`Install (); - `Reinstall (); - `Change (`Up,(),()); - `Change (`Down,(),()); - `Remove ()] - in - let msgs = List.filter (fun (a,_) -> a <> 0) (List.combine stats titles) in - if utf then - OpamStd.List.concat_map " " - (fun (n,t) -> Printf.sprintf "%s %s" t (string_of_int n)) - msgs - else - OpamStd.List.concat_map " | " - (fun (n,t) -> - Printf.sprintf "%s to %s" - (OpamConsole.colorise `yellow (string_of_int n)) t) - msgs + let titles_stats = List.filter (fun (_, n) -> n <> 0) titles_stats in + let msgs = + let open OpamActionGraph in + List.map (fun (a, n) -> + let noun = + let sing, plur = noun_of_action a in + if n = 1 then sing else plur + in + String.concat " " + (if utf + then [ action_color a (symbol_of_action a); + OpamConsole.colorise `bold (string_of_int n); + noun ] + else [ OpamConsole.colorise `bold (string_of_int n); + action_color a noun ])) + titles_stats + in + OpamStd.Format.pretty_list msgs let solution_is_empty t = OpamCudf.ActionGraph.is_empty t @@ -772,7 +768,7 @@ let print_solution ~messages ~append ~requested ~reinstall ~available t = match List.filter (fun (a, _) -> filter a) actions_table with | [] -> () | ((a,_) :: _) as acts -> - OpamConsole.formatted_msg " %s %s %s %s: %s\n" + OpamConsole.formatted_msg " %s %s %s %s %s\n" (OpamActionGraph.action_color a "==") (OpamActionGraph.name_of_action a) (OpamConsole.colorise `bold (string_of_int ((List.length acts)))) diff --git a/tests/reftests/avoid-version.test b/tests/reftests/avoid-version.test index 50e8a06edbe..13cb4f2d062 100644 --- a/tests/reftests/avoid-version.test +++ b/tests/reftests/avoid-version.test @@ -89,7 +89,6 @@ The following actions will be faked: - downgrade a 3 to 2 [required by b] == upgrade 1 package: == - upgrade b 1 to 2 -===== 1 to upgrade | 1 to downgrade ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> Faking installation of a.2 @@ -101,7 +100,6 @@ The following actions will be faked: - downgrade b 2 to 1 [uses a] == upgrade 1 package: == - upgrade a 2 to 3 -===== 1 to upgrade | 1 to downgrade ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> Faking installation of a.3 diff --git a/tests/reftests/cudf-preprocess.test b/tests/reftests/cudf-preprocess.test index 39c31ffdfdc..4400babebef 100644 --- a/tests/reftests/cudf-preprocess.test +++ b/tests/reftests/cudf-preprocess.test @@ -153,7 +153,6 @@ The following actions will be faked: - install xenstore 2.1.1 [required by conduit-mirage] - install xenstore_transport 1.3.0 [required by vchan] - install zarith 1.12 [required by awa] -===== 135 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> Faking installation of cmdliner.1.0.4 @@ -309,7 +308,6 @@ The following actions would be faked: == upgrade 2 packages: == - upgrade checkseum 0.3.0 to 0.3.1 [required by git] - upgrade optint 0.0.4 to 0.1.0 -===== 9 to recompile | 2 to upgrade ===== ### opam install optint.0.1.0 The following actions would be faked: == recompile 9 packages: == @@ -325,7 +323,6 @@ The following actions would be faked: == upgrade 2 packages: == - upgrade checkseum 0.3.0 to 0.3.1 [uses optint] - upgrade optint 0.0.4 to 0.1.0 -===== 9 to recompile | 2 to upgrade ===== ### OPAMCUDFTRIM=0 opam install optint.0.1.0 The following actions would be faked: == recompile 9 packages: == @@ -341,7 +338,6 @@ The following actions would be faked: == upgrade 2 packages: == - upgrade checkseum 0.3.0 to 0.3.1 [uses optint] - upgrade optint 0.0.4 to 0.1.0 -===== 9 to recompile | 2 to upgrade ===== ### OPAMCUDFTRIM=simple opam install optint.0.1.0 The following actions would be faked: == recompile 9 packages: == @@ -357,4 +353,3 @@ The following actions would be faked: == upgrade 2 packages: == - upgrade checkseum 0.3.0 to 0.3.1 [uses optint] - upgrade optint 0.0.4 to 0.1.0 -===== 9 to recompile | 2 to upgrade ===== diff --git a/tests/reftests/init.test b/tests/reftests/init.test index d536cfc0bb0..e48f6c71294 100644 --- a/tests/reftests/init.test +++ b/tests/reftests/init.test @@ -87,7 +87,6 @@ The following actions will be faked: - upgrade ocaml 4.07.0 to 4.10.0 == install 1 package: == - install ocaml-base-compiler 4.10.0 [required by ocaml] -===== 1 to install | 1 to recompile | 1 to upgrade | 1 to remove ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> Faking installation of ocaml-base-compiler.4.10.0 diff --git a/tests/reftests/legacy-git.test b/tests/reftests/legacy-git.test index cd61d658520..1a6d075aeec 100644 --- a/tests/reftests/legacy-git.test +++ b/tests/reftests/legacy-git.test @@ -775,7 +775,6 @@ The following actions will be performed: == install 2 packages: == - install P1 1 [required by P5] I ll always bother you displaying this message - install P5 1 -===== 2 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P1.1 (git+file://${BASEDIR}/GIT/P1-1) @@ -821,7 +820,6 @@ The following actions will be performed: == remove 2 packages: == - remove P1 1 - remove P5 1 -===== 2 to remove ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed P5.1 @@ -834,7 +832,6 @@ The following actions will be performed: == install 2 packages: == - install P1 1 [required by P5] I ll always bother you displaying this message - install P5 1 -===== 2 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P1.1 (git+file://${BASEDIR}/GIT/P1-1) @@ -856,7 +853,6 @@ The following actions will be performed: - recompile P5 1 [uses P2] == install 1 package: == - install P2 1 -===== 1 to install | 1 to recompile ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P2.1 (git+file://${BASEDIR}/GIT/P2) @@ -888,7 +884,6 @@ The following actions will be performed: == remove 2 packages: == - remove P1 1 - remove P2 1 -===== 2 to remove ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed P2.1 @@ -902,7 +897,6 @@ The following actions will be performed: - install P1 1 I ll always bother you displaying this message - install P2 1 - install P5 1 -===== 3 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P1.1 (git+file://${BASEDIR}/GIT/P1-1) @@ -928,7 +922,6 @@ The following actions will be performed: - remove P2 1 == recompile 1 package: == - recompile P5 1 [uses P2] -===== 1 to recompile | 1 to remove ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P5.1 (no changes) @@ -946,7 +939,6 @@ The following actions will be performed: == remove 2 packages: == - remove P1 1 - remove P5 1 [uses P1] -===== 2 to remove ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed P5.1 @@ -1049,7 +1041,6 @@ The following actions will be performed: - recompile P2 1 [uses P1] - recompile P3 1~weird-version.test [uses P1] - recompile P4 1 [uses P2, P3] -===== 4 to recompile ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P1.1 (no changes) @@ -1157,7 +1148,6 @@ The following actions will be performed: - recompile P3 1~weird-version.test [uses P1] == upgrade 1 package: == - upgrade P4 1 to 3 -===== 3 to recompile | 1 to upgrade ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P1.1 (no changes) @@ -1238,7 +1228,6 @@ The following actions will be performed: == remove 2 packages: == - remove P3 1~weird-version.test - remove P4 2 -===== 2 to remove ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed P4.2 @@ -1265,7 +1254,6 @@ The following actions will be performed: == install 2 packages: == - install P1 1 I ll always bother you displaying this message - install P2 1 -===== 2 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P1.1 (git+file://${BASEDIR}/GIT/P1-1) @@ -1341,7 +1329,6 @@ The following actions will be performed: - install P2 1 - install P3 1~weird-version.test - install P4 3 -===== 5 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed ocaml.10+a+b diff --git a/tests/reftests/legacy-local.test b/tests/reftests/legacy-local.test index 41d2b4f8a4f..a1e9b329ac9 100644 --- a/tests/reftests/legacy-local.test +++ b/tests/reftests/legacy-local.test @@ -714,7 +714,6 @@ The following actions will be performed: == install 2 packages: == - install P1 1 [required by P5] I ll always bother you displaying this message - install P5 1 -===== 2 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P1.1 (cached) @@ -760,7 +759,6 @@ The following actions will be performed: == remove 2 packages: == - remove P1 1 - remove P5 1 -===== 2 to remove ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed P5.1 @@ -773,7 +771,6 @@ The following actions will be performed: == install 2 packages: == - install P1 1 [required by P5] I ll always bother you displaying this message - install P5 1 -===== 2 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P1.1 (cached) @@ -795,7 +792,6 @@ The following actions will be performed: - recompile P5 1 [uses P2] == install 1 package: == - install P2 1 -===== 1 to install | 1 to recompile ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P2.1 (${BASEDIR}/REPO/cache) @@ -827,7 +823,6 @@ The following actions will be performed: == remove 2 packages: == - remove P1 1 - remove P2 1 -===== 2 to remove ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed P2.1 @@ -841,7 +836,6 @@ The following actions will be performed: - install P1 1 I ll always bother you displaying this message - install P2 1 - install P5 1 -===== 3 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P1.1 (cached) @@ -867,7 +861,6 @@ The following actions will be performed: - remove P2 1 == recompile 1 package: == - recompile P5 1 [uses P2] -===== 1 to recompile | 1 to remove ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P5.1 (cached) @@ -885,7 +878,6 @@ The following actions will be performed: == remove 2 packages: == - remove P1 1 - remove P5 1 [uses P1] -===== 2 to remove ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed P5.1 @@ -988,7 +980,6 @@ The following actions will be performed: - recompile P2 1 [uses P1] - recompile P3 1~weird-version.test [uses P1] - recompile P4 1 [uses P2, P3] -===== 4 to recompile ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P1.1 (cached) @@ -1082,7 +1073,6 @@ The following actions will be performed: == upgrade 2 packages: == - upgrade P1 1 to 2 - upgrade P4 1 to 3 -===== 2 to recompile | 2 to upgrade ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P1.2 (${BASEDIR}/REPO/cache) @@ -1131,7 +1121,6 @@ The following actions will be performed: == recompile 2 packages: == - recompile P2 1 [uses P1] - recompile P3 1~weird-version.test [uses P1] -===== 2 to recompile | 2 to downgrade ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P1.1 (cached) @@ -1179,7 +1168,6 @@ The following actions will be performed: == remove 2 packages: == - remove P3 1~weird-version.test - remove P4 2 -===== 2 to remove ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed P4.2 @@ -1206,7 +1194,6 @@ The following actions will be performed: == install 2 packages: == - install P1 1 I ll always bother you displaying this message - install P2 1 -===== 2 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved P1.1 (cached) @@ -1282,7 +1269,6 @@ The following actions will be performed: - install P2 1 - install P3 1~weird-version.test - install P4 3 -===== 5 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed ocaml.10+a+b diff --git a/tests/reftests/opamrt-big-upgrade.test b/tests/reftests/opamrt-big-upgrade.test index 447926a8e6a..6652439ec8a 100644 --- a/tests/reftests/opamrt-big-upgrade.test +++ b/tests/reftests/opamrt-big-upgrade.test @@ -154,7 +154,6 @@ The following actions will be faked: - install xmlm 1.2.0 - install yojson 1.1.6 - install zed 1.2 -===== 63 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> Faking installation of base-bigarray.base @@ -267,7 +266,6 @@ The following actions will be faked: - install pa_bench 109.55.02 [required by core_kernel] - install pa_test 109.53.02 [required by core, async_core, core_extended] - install typerep 109.55.02 [required by core_kernel] -===== 3 to install | 5 to recompile | 33 to upgrade ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> Faking installation of atd.1.1.0 diff --git a/tests/reftests/opamrt-dep-cycle.test b/tests/reftests/opamrt-dep-cycle.test index ec3f3d8296a..840a85e0993 100644 --- a/tests/reftests/opamrt-dep-cycle.test +++ b/tests/reftests/opamrt-dep-cycle.test @@ -25,7 +25,6 @@ The following actions will be performed: == install 2 packages: == - install a 1 - install b 1 [required by a] -===== 2 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed b.1 @@ -39,7 +38,6 @@ The following actions will be performed: == upgrade 2 packages: == - upgrade a 1 to 2 - upgrade b 1 to 2 -===== 2 to upgrade ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed a.1 @@ -55,7 +53,6 @@ The following actions will be performed: == downgrade 2 packages: == - downgrade a 2 to 1 - downgrade b 2 to 1 [required by a] -===== 2 to downgrade ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed b.2 @@ -71,7 +68,6 @@ The following actions will be performed: == upgrade 2 packages: == - upgrade a 1 to 2 - upgrade b 1 to 2 -===== 2 to upgrade ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed a.1 @@ -96,7 +92,6 @@ The following actions will be performed: - downgrade a 2 to 1 == install 1 package: == - install b 1 [required by a] -===== 1 to install | 1 to downgrade ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed a.2 diff --git a/tests/reftests/opamrt-reinstall.test b/tests/reftests/opamrt-reinstall.test index c1e094ca6c7..5f28614f238 100644 --- a/tests/reftests/opamrt-reinstall.test +++ b/tests/reftests/opamrt-reinstall.test @@ -30,7 +30,6 @@ The following actions will be performed: - install b 1 [required by c] - install c 1 [required by d] - install d 1 -===== 4 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed a.1 @@ -52,7 +51,6 @@ The following actions will be performed: - recompile b 1 - recompile c 1 [uses b] - recompile d 1 [uses c] -===== 3 to recompile ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed d.1 @@ -86,7 +84,6 @@ The following actions will be performed: - remove b 1 - remove c 1 [uses b] - remove d 1 [uses c] -===== 3 to remove ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed d.1 @@ -103,7 +100,6 @@ The following actions will be performed: - install b 1 [required by c] - install c 1 [required by d] - install d 1 -===== 3 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed b.1 @@ -131,7 +127,6 @@ The following actions will be performed: - remove b 1 [no longer available] - remove c 1 [uses b] - remove d 1 [uses c] -===== 3 to remove ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed d.1 @@ -163,7 +158,6 @@ The following actions will be performed: - install b 1 [required by c] - install c 1 [required by d] - install d 1 -===== 3 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed b.1 @@ -199,7 +193,6 @@ The following actions will be performed: == recompile 2 packages: == - recompile c 1 - recompile d 1 [uses c] -===== 2 to recompile ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed d.1 @@ -227,7 +220,6 @@ The following actions will be performed: - recompile d 1 [uses c] == upgrade 1 package: == - upgrade c 1 to 2 -===== 1 to recompile | 1 to upgrade ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed d.1 @@ -249,7 +241,6 @@ The following actions will be performed: - recompile b 1 (pinned) - recompile c 2 [uses b] - recompile d 1 [uses c] -===== 3 to recompile ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed d.1 @@ -274,7 +265,6 @@ The following actions will be performed: - recompile b 1 (pinned) [uses a] - recompile c 2 [uses b] - recompile d 1 [uses c] -===== 4 to recompile ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed d.1 @@ -308,7 +298,6 @@ The following actions would be performed: - recompile d 1 [uses c] == upgrade 1 package: == - upgrade a 1 to 2 -===== 3 to recompile | 1 to upgrade ===== ### opam unpin b --show Ok, b would no longer be pinned locally (version 1) The following actions would be performed: @@ -316,7 +305,6 @@ The following actions would be performed: - remove b 1 - remove c 2 [uses b] - remove d 1 [uses c] -===== 3 to remove ===== ### opam unpin b --no-action Ok, b is no longer pinned locally (version 1) ### opam upgrade @@ -327,7 +315,6 @@ The following actions will be performed: - remove d 1 [uses c] == upgrade 1 package: == - upgrade a 1 to 2 -===== 1 to upgrade | 3 to remove ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed d.1 diff --git a/tests/reftests/orphans.test b/tests/reftests/orphans.test index 0fc63dedb41..e3c037a1524 100644 --- a/tests/reftests/orphans.test +++ b/tests/reftests/orphans.test @@ -14,7 +14,6 @@ The following actions will be performed: == install 2 packages: == - install bar 1 - install foo 1 [required by bar] -===== 2 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed foo.1 @@ -38,13 +37,11 @@ The following actions would be performed: == remove 2 packages: == - remove bar 1 [uses foo] - remove foo 1 [no longer available] -===== 2 to remove ===== ### opam upgrade --show --fixup The following actions would be performed: == remove 2 packages: == - remove bar 1 [uses foo] - remove foo 1 [no longer available] -===== 2 to remove ===== ### : dependency foo is installed but no longer available ### opam upgrade bar [ERROR] Package conflict! @@ -69,7 +66,6 @@ The following actions would be performed: - remove bar 1 [conflicts with foo] == upgrade 1 package: == - upgrade foo 1 to 2 -===== 1 to upgrade | 1 to remove ===== ### opam-version: "2.0" depends: "foo" {>= "1"} @@ -78,13 +74,11 @@ The following actions would be performed: == upgrade 2 packages: == - upgrade bar 1 to 2 - upgrade foo 1 to 2 -===== 2 to upgrade ===== ### opam upgrade --show --fixup The following actions would be performed: == upgrade 2 packages: == - upgrade bar 1 to 2 - upgrade foo 1 to 2 [required by bar] -===== 2 to upgrade ===== ### opam reinstall baz baz is not installed. Install it? [Y/n] y The following actions will be performed: @@ -99,7 +93,6 @@ The following actions will be performed: == upgrade 2 packages: == - upgrade bar 1 to 2 - upgrade foo 1 to 2 [required by bar] -===== 2 to upgrade ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> removed bar.1 diff --git a/tests/reftests/remove.test b/tests/reftests/remove.test index 8b36520d217..8057a7d4580 100644 --- a/tests/reftests/remove.test +++ b/tests/reftests/remove.test @@ -14,7 +14,6 @@ The following actions will be performed: - install a 1 - install b 1 - install c 1 -===== 3 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed a.1 @@ -27,7 +26,6 @@ The following actions would be performed: - remove a 1 == recompile 1 package: == - recompile c 1 [uses a] -===== 1 to recompile | 1 to remove ===== ### opam remove --auto --show Nothing to do. ### opam remove a --auto --show @@ -36,7 +34,6 @@ The following actions would be performed: - remove a 1 == recompile 1 package: == - recompile c 1 [uses a] -===== 1 to recompile | 1 to remove ===== ### :::::: message on removal of an unavailable package (#4890) ### opam-version: "2.0" diff --git a/tests/reftests/upgrade-format.test b/tests/reftests/upgrade-format.test index 1e4bc23d9c8..1e541b718d3 100644 --- a/tests/reftests/upgrade-format.test +++ b/tests/reftests/upgrade-format.test @@ -91,7 +91,6 @@ The following actions will be faked: - install opam-core 2.0.7 (pinned) - install re 1.9.0 [required by opam-core] - install seq base [required by re] -===== 14 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> Faking installation of base-bigarray.base @@ -131,7 +130,6 @@ The following actions would be performed: == install 2 packages: == - install opam-file-format 2.0.0 [required by opam-format] - install opam-format 2.1.0~beta3 (pinned) -===== 2 to install | 1 to upgrade ===== ### : Testing preserved format with upgrade : ### opam-version: "2.0" diff --git a/tests/reftests/var-option.test b/tests/reftests/var-option.test index 627c8477629..50c59455c93 100644 --- a/tests/reftests/var-option.test +++ b/tests/reftests/var-option.test @@ -47,7 +47,6 @@ The following actions will be performed: == install 2 packages: == - install base 2 [required by i-got-the-variables] - install i-got-the-variables 2.4.6 -===== 2 to install ===== <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed base.2