diff --git a/src/client/opamCommands.ml b/src/client/opamCommands.ml index 301dc9aa4a7..366dfa471a8 100644 --- a/src/client/opamCommands.ml +++ b/src/client/opamCommands.ml @@ -3099,12 +3099,11 @@ let switch cli = in if is_new_switch then with_repos_rt gt cli repos @@ fun (repos, rt) -> - let synopsis = "Import from " ^ Filename.basename filename in let (), gt = OpamGlobalState.with_write_lock gt @@ fun gt -> let gt, st = OpamSwitchCommand.create gt ~rt - ~synopsis ?repos ~invariant:OpamFormula.Empty + ?repos ~invariant:OpamFormula.Empty ~update_config:(not no_switch) switch @@ fun st -> diff --git a/src/client/opamSwitchCommand.ml b/src/client/opamSwitchCommand.ml index 4fba4086f19..35c0de4bb6e 100644 --- a/src/client/opamSwitchCommand.ml +++ b/src/client/opamSwitchCommand.ml @@ -241,23 +241,6 @@ let install_compiler OpamConsole.note "No invariant was set, you may want to use `opam switch set-invariant' \ to keep a stable compiler version on upgrades."; - let t = - if t.switch_config.OpamFile.Switch_config.synopsis = "" then - let synopsis = - if invariant = OpamFormula.Empty then - OpamSwitch.to_string t.switch - else - OpamFormula.to_string invariant - in - let switch_config = - { t.switch_config with OpamFile.Switch_config.synopsis } - in - if not (OpamStateConfig.(!r.dryrun) || OpamClientConfig.(!r.show)) then - OpamSwitchAction.install_switch_config t.switch_global.root t.switch - switch_config; - { t with switch_config } - else t - in let t = let base_comp = OpamSwitchState.compute_invariant_packages