Library
Module
Module type
Parameter
Class
Class type
Interface with the solver, processing of full solutions through actions
val resolve :
'a OpamStateTypes.switch_state ->
OpamTypes.user_action ->
orphans:OpamTypes.package_set ->
?reinstall:OpamTypes.package_set ->
requested:OpamTypes.name_set ->
OpamTypes.atom OpamTypes.request ->
(OpamSolver.solution, OpamCudf.conflict) OpamTypes.result
Resolve an user request
val apply :
?ask:bool ->
OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamTypes.user_action ->
requested:OpamPackage.Name.Set.t ->
?add_roots:OpamPackage.Name.Set.t ->
?assume_built:bool ->
OpamSolver.solution ->
OpamStateTypes.rw OpamStateTypes.switch_state * OpamTypes.solver_result
Apply a solution returned by the solver. If ask
is not specified, prompts the user whenever the solution isn't obvious from the request. add_roots
defaults to the set of newly installed packages that are part of requested
.
val resolve_and_apply :
?ask:bool ->
OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamTypes.user_action ->
orphans:OpamTypes.package_set ->
?reinstall:OpamTypes.package_set ->
requested:OpamPackage.Name.Set.t ->
?add_roots:OpamPackage.Name.Set.t ->
?assume_built:bool ->
OpamTypes.atom OpamTypes.request ->
OpamStateTypes.rw OpamStateTypes.switch_state * OpamTypes.solver_result
Call the solver to get a solution and then call apply
. If ask
is not specified, prompts the user whenever the solution isn't obvious from the request. add_roots
defaults to the set of newly installed packages that are part of requested
.
val check_solution :
?quiet:bool ->
'a OpamStateTypes.switch_state ->
OpamTypes.solver_result ->
unit
Raise an error if no solution is found or in case of error. Unless quiet
is set, print a message indicating that nothing was done on an empty solution.
Return an atom with a strict version constraint
Return a simple atom, with no version constrain, from a package
Returns an atom with a strict version constraint from a package
Return a list of simple atoms (ie. with no version constraints) from a set of packages
Return a list of constrained atoms from a set of packages
val check_availability :
?permissive:bool ->
'a OpamStateTypes.switch_state ->
OpamPackage.Set.t ->
OpamTypes.atom list ->
unit
Checks that the atoms can possibly be verified (individually) in a package set. Displays an error and exits otherwise. permissive
just changes the error message.
Matches package names to their existing counterparts, up to capitalisation. If no match exists, returns the name unchanged.
val sanitize_atom_list :
?permissive:bool ->
'a OpamStateTypes.switch_state ->
OpamTypes.atom list ->
OpamTypes.atom list
Takes a "raw" list of atoms (from the user), and match it to existing packages. Match packages with the wrong capitalisation, and raises errors on non-existing packages, and unavailable ones unless permissive
is set. Exits with a message on error.