Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Synchronisation and downloading of repositories and package sources
val repositories :
OpamStateTypes.rw OpamStateTypes.repos_state ->
OpamTypes.repository list ->
OpamTypes.repository list * OpamStateTypes.rw OpamStateTypes.repos_state
Update the given repositories from their upstream, and returns the updated state. This also saves the updated cached state, and the updated repository config (it may be changed by e.g. redirects). The returned list is the list of repositories for which the update failed.
val dev_packages :
OpamStateTypes.rw OpamStateTypes.switch_state ->
?working_dir:OpamTypes.package_set ->
OpamTypes.package_set ->
bool * OpamStateTypes.rw OpamStateTypes.switch_state * OpamTypes.package_set
update_dev_packages t
checks for upstream changes for packages first in the switch cache and then in the global cache. Return the packages whose contents have changed upstream.
Packages that are members of the working_dir
and are bound to a local directory under version control are synchronised with its working state, bypassing version control.
Side-effect: update the reinstall file, adding installed changed packages to the current switch to-reinstall set.
The returned boolean is true if all updates were successful.
val dev_package :
OpamStateTypes.rw OpamStateTypes.switch_state ->
?working_dir:bool ->
OpamTypes.package ->
((OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamStateTypes.rw OpamStateTypes.switch_state)
* bool)
OpamProcess.job
Updates a single dev or pinned package from its upstream. If working_dir
is set, and the package is bound to a local, version-controlled dir, use the working dir state instead of what has been commited to version control.
Returns true if changed, false otherwise, and a switch_state update function, applying possible changes in packages metadata
val pinned_packages :
OpamStateTypes.rw OpamStateTypes.switch_state ->
?working_dir:OpamTypes.name_set ->
OpamTypes.name_set ->
OpamStateTypes.rw OpamStateTypes.switch_state * OpamTypes.package_set
A subset of update_dev_packages that only takes packages names and only works on pinned packages. Also updates the reinstall file of the current switch
val pinned_package :
OpamStateTypes.rw OpamStateTypes.switch_state ->
?version:OpamTypes.version ->
?working_dir:bool ->
OpamTypes.name ->
((OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamStateTypes.rw OpamStateTypes.switch_state)
* bool)
OpamProcess.job
Updates a dev pinned package from its upstream; returns true if changed, false otherwise, and a switch_state update function that applies possible changes in packages metadata. Updates the on-disk overlay
val download_package_source :
'a OpamStateTypes.switch_state ->
OpamTypes.package ->
OpamTypes.dirname ->
unit OpamTypes.download option OpamProcess.job
Download or synchronise the upstream source for the given package into the given directory. Also places all of the package extra files (that have a known hash) into the cache. For non-VC remotes, verifies the checksum if any
val cleanup_source :
'a OpamStateTypes.switch_state ->
OpamFile.OPAM.t option ->
OpamFile.OPAM.t ->
unit
cleanup_source old_opam_option new_opam
checks if the remote URL has changed between old_opam_option
and new_opam
, and, depending on that, cleans up the source directory of the package (OpamPath.Switch.sources
) if needed.
val fetch_dev_package :
OpamFile.URL.t ->
OpamTypes.dirname ->
?working_dir:bool ->
OpamTypes.package ->
unit OpamTypes.download OpamProcess.job
Low-level function to retrieve the package source into its local cache