package opam-state
Install
Dune Dependency
Authors
-
David Allsopp
-
VVincent Bernardoff <vb@luminar.eu.org>
-
RRaja Boujbel <raja.boujbel@ocamlpro.com>
-
KKate Deplaix <kit-ty-kate@outlook.com>
-
RRoberto Di Cosmo <roberto@dicosmo.org>
-
TThomas Gazagnaire <thomas@gazagnaire.org>
-
LLouis Gesbert <louis.gesbert@ocamlpro.com>
-
FFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
-
AAnil Madhavapeddy <anil@recoil.org>
-
GGuillem Rieu <guillem.rieu@ocamlpro.com>
-
RRalf Treinen <ralf.treinen@pps.jussieu.fr>
-
FFrederic Tuong <tuong@users.gforge.inria.fr>
Maintainers
Sources
md5=7a902ac41ad9da83a0e80576c9d9c122
sha512=a447dab252e93ea81e0cf4ab1a64c9386911af5fd45344f1ac5f71eb0abb472f660e542c645e3b0657715b5ed81903a581152cdac9e24cabc72c5bf654743ae8
doc/opam-state/OpamSwitchAction/index.html
Module OpamSwitchAction
Source
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
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