From 1e81a453c5e77e83cbca89f2976995d6571c64aa Mon Sep 17 00:00:00 2001 From: Mahfuzullah Galib Date: Thu, 19 Dec 2024 07:58:00 +0600 Subject: [PATCH 1/2] fixed https://github.com/ocaml/opam/issues/5520 --- src/client/opamLockCommand.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/opamLockCommand.ml b/src/client/opamLockCommand.ml index 4f886ef952e..13e39fab963 100644 --- a/src/client/opamLockCommand.ml +++ b/src/client/opamLockCommand.ml @@ -96,7 +96,7 @@ let select_packages atom_locs st = atoms in if missing <> [] then - (OpamConsole.error + (OpamConsole.error_and_exit "Skipping %s, dependencies are not satisfied in this switch, \ not installed packages are:\n%s" (OpamPackage.to_string nv) From a658c6840c4f6cbf3693dd58e813932505fb9323 Mon Sep 17 00:00:00 2001 From: Mahfuzullah Galib Date: Thu, 19 Dec 2024 08:28:33 +0600 Subject: [PATCH 2/2] all done and rebased/squashed, the text below is the texts of last commits that have been cleaned up and squashed. sorry 1st commit was a mistake Update src/client/opamLockCommand.ml based on suggestions of @kit-ty-kate Co-authored-by: Kate i commited last time from ipad and sorry for the mistale my error msg needs correction all done all done, this time really --- src/client/opamLockCommand.ml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/client/opamLockCommand.ml b/src/client/opamLockCommand.ml index 13e39fab963..9d246967caa 100644 --- a/src/client/opamLockCommand.ml +++ b/src/client/opamLockCommand.ml @@ -96,12 +96,13 @@ let select_packages atom_locs st = atoms in if missing <> [] then - (OpamConsole.error_and_exit - "Skipping %s, dependencies are not satisfied in this switch, \ - not installed packages are:\n%s" - (OpamPackage.to_string nv) - (OpamStd.Format.itemize OpamFormula.string_of_atom missing); - acc) + (OpamConsole.error_and_exit `Not_found + "Operation aborted: + Dependencies for %s required in the current switch are not met. \ + \nPlease ensure the following packages are installed:\n%s" + (OpamPackage.to_string nv) + (OpamStd.Format.itemize OpamFormula.string_of_atom missing); + acc) else OpamPackage.Set.add nv acc) names OpamPackage.Set.empty