package opam-state
Install
Dune Dependency
Authors
-
VVincent Bernardoff <vb@luminar.eu.org>
-
RRaja Boujbel <raja.boujbel@ocamlpro.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
sha256=7f812f9b78e9948fb641bc559183721fedea62d3dafb2960bb786b400eae1de5
md5=385612adf8733f6816cfcbc39e3e1b50
doc/opam-state/OpamRepositoryState/index.html
Module OpamRepositoryState
Source
loading and handling of the repository state of an opam root (i.e. what is in ~/.opam/repo)
val load :
'a OpamStateTypes.lock ->
[< OpamStateTypes.unlocked ] OpamStateTypes.global_state ->
'a OpamStateTypes.repos_state
val with_ :
'a OpamStateTypes.lock ->
[< OpamStateTypes.unlocked ] OpamStateTypes.global_state ->
('a OpamStateTypes.repos_state -> 'b) ->
'b
Loads the repository state as load
, and calls the given function while keeping it locked (as per the lock
argument), releasing the lock afterwards
val find_package_opt :
'a OpamStateTypes.repos_state ->
OpamTypes.repository_name list ->
OpamTypes.package ->
(OpamTypes.repository_name * OpamFile.OPAM.t) option
Returns the repo of origin and metadata corresponding to a package, if found, from a sorted list of repositories (highest priority first)
val build_index :
'a OpamStateTypes.repos_state ->
OpamTypes.repository_name list ->
OpamFile.OPAM.t OpamPackage.Map.t
Given the repos state, and a list of repos to use (highest priority first), build a map of all existing package definitions
val get_repo :
'a OpamStateTypes.repos_state ->
OpamTypes.repository_name ->
OpamTypes.repository
Finds a package repository definition from its name (assuming it's in ROOT/repos/)
Load all the metadata within the local mirror of the given repository, without cache
val unlock :
'a OpamStateTypes.repos_state ->
OpamStateTypes.unlocked OpamStateTypes.repos_state
Releases any locks on the given repos_state
val with_write_lock :
?dontblock:bool ->
'a OpamStateTypes.repos_state ->
(OpamStateTypes.rw OpamStateTypes.repos_state ->
'b * OpamStateTypes.rw OpamStateTypes.repos_state) ->
'b * 'a OpamStateTypes.repos_state
Calls the provided function, ensuring a temporary write lock on the given repository state
Writes the repositories config file back to disk