Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Switch-related actions and changes
val create_empty_switch :
OpamStateTypes.rw OpamStateTypes.global_state ->
?synopsis:string ->
?repos:OpamTypes.repository_name list ->
?invariant:OpamTypes.formula ->
OpamTypes.switch ->
OpamStateTypes.rw OpamStateTypes.global_state
Initialises a new switch with the given name in the given opam root, registers it in the global config and returns the updated global state
val write_selections : OpamStateTypes.rw OpamStateTypes.switch_state -> unit
Writes the current state file to disk (installed, pinned, root packages etc.). Unless OpamStateConfig.(!r.dryrun)
val set_current_switch :
OpamStateTypes.rw OpamStateTypes.global_state ->
'a OpamStateTypes.switch_state ->
'a OpamStateTypes.switch_state
Updates the global default switch to the one corresponding to the given state; fails and exits with a message if the switch is external
val gen_switch_config :
OpamTypes.dirname ->
?synopsis:string ->
?repos:OpamTypes.repository_name list ->
?invariant:OpamTypes.formula ->
OpamTypes.switch ->
OpamFile.Switch_config.t
Create the default global_config structure for a switch, including default prefix
val install_switch_config :
OpamTypes.dirname ->
OpamTypes.switch ->
OpamFile.Switch_config.t ->
unit
(Re-)install the configuration for a given root and switch
val install_metadata :
OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamTypes.package ->
unit
Add the package metadata to the switch-local cache of installed packages
val remove_metadata :
OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamTypes.package_set ->
unit
Remove the metadata of the package from the switch-local cache of installed packages
val add_to_reinstall :
OpamStateTypes.rw OpamStateTypes.switch_state ->
unpinned_only:bool ->
OpamTypes.package_set ->
OpamStateTypes.rw OpamStateTypes.switch_state
Update the on-disk set of packages marked to reinstall on the current switch (excepting compiler packages, and pinned packages if unpinned_only
is set)
val add_to_installed :
OpamStateTypes.rw OpamStateTypes.switch_state ->
?root:bool ->
OpamTypes.package ->
OpamStateTypes.rw OpamStateTypes.switch_state
Updates the package selections and switch config to take into account the given newly installed package. The updated state is written to disk unless OpamStateConfig.(!r.dry_run)
and returned.
val remove_from_installed :
?keep_as_root:bool ->
OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamTypes.package ->
OpamStateTypes.rw OpamStateTypes.switch_state
Updates the package selections and switch config to take into account the removed package. The updated state is written to disk unless OpamStateConfig.(!r.dry_run)
, and returned. If keep_as_root
, the package isn't removed from the switch state installed_roots
set.
val update_switch_state :
?installed:OpamTypes.package_set ->
?installed_roots:OpamTypes.package_set ->
?reinstall:OpamTypes.package_set ->
?pinned:OpamTypes.package_set ->
OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamStateTypes.rw OpamStateTypes.switch_state
Update the switch selections with the supplied optional arguments. Changes are written to disk and returned