package opam-state
Install
dune-project
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=79d057547b7114e31334bc4f556bc541
sha512=707b652997bae086003c4164029ed40a68e9c465b4ce1731d0f8ccc0a496c5b6d9011e45bc2b6f73e56d316e54bce7c82becb83bd7de4fa53b0795ad7ae7032a
doc/opam-state/OpamGlobalState/index.html
Module OpamGlobalStateSource
Loading and handling of the global state of an opam root
Loads the global state (from the opam root obtained through OpamStateConfig.(!r.root))
Loads the global state as load, and calls the given function while keeping it locked (as per the lock argument), releasing the lock afterwards
The set of all installed packages, in any switch
val fold_switches :
(OpamTypes.switch -> OpamTypes.switch_selections -> 'a -> 'a) ->
'b OpamStateTypes.global_state ->
'a ->
'aFold over switches, using switch selections. Switch selection file switch-state is loaded only read-only; no further checks are done on the opam root version.
Checks a switch for existence: either configured in the opam root, or an existing local switch with a configuration file pointing to the current root
val installed_versions :
'a OpamStateTypes.global_state ->
OpamTypes.name ->
OpamTypes.switch list OpamTypes.package_mapReturns the map of installed instances of the package name towards the list of switches they are installed in
Default list of repositories to get packages from, ordered by decreasing priority. This can be overridden by switch-specific selections, and does not have to include all configured repositories.
val unlock :
'a OpamStateTypes.global_state ->
OpamStateTypes.unlocked OpamStateTypes.global_stateReleases any locks on the given global_state
Releases any locks on the given global state and then ignores it.
Using drop gt is equivalent to ignore (unlock gt), and safer than other uses of ignore where it is not enforced by the type-system that the value is unlocked before it is lost.
val with_write_lock :
?dontblock:bool ->
'a OpamStateTypes.global_state ->
(OpamStateTypes.rw OpamStateTypes.global_state ->
'b * 'c OpamStateTypes.global_state) ->
'b * 'a OpamStateTypes.global_stateCalls the provided function, ensuring a temporary write lock on the given global state
Writes back the global configuration file ~/.opam/config
Updates the configured list of switches, making sure the current switch is registered if it is set and exists, and removing any non-existing switches. Writes back to disk if possible (ie lock is available)
Description used for system inferred variables