OpamRepositoryStateSourceloading 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_stateval with_ :
'a OpamStateTypes.lock ->
[< OpamStateTypes.unlocked ] OpamStateTypes.global_state ->
('a OpamStateTypes.repos_state -> 'b) ->
'bLoads 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) optionReturns 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.tGiven 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.repositoryFinds 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_stateReleases 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_stateCalls the provided function, ensuring a temporary write lock on the given repository state
Writes the repositories config file back to disk