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=a5ac5882814d72ec3f8ed512ca9a1fe6
sha512=7c3a23798cad6a940f12154904144bdebf622a55c2a56e813a6bf3b180f5e5843971b21902c46547716836fd7e04c239256f8238db1b6ba049b878438fdad38f
doc/opam-state/OpamUpdate/index.html
Module OpamUpdateSource
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_stateUpdate 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 ->
?autolock:bool ->
?working_dir:OpamTypes.package_set ->
OpamTypes.package_set ->
bool * OpamStateTypes.rw OpamStateTypes.switch_state * OpamTypes.package_setupdate_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.
If autolock is set to true, automatically update package from lock file if it was pinned with a lock file at first.
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 ->
?autolock:bool ->
?working_dir:bool ->
OpamTypes.package ->
((OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamStateTypes.rw OpamStateTypes.switch_state)
* bool)
OpamProcess.jobUpdates 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 committed to version control.
If autolock is set to true, automatically update package from lock file if it was pinned with a lock file at first.
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 ->
?autolock:bool ->
?working_dir:OpamTypes.name_set ->
OpamTypes.name_set ->
OpamStateTypes.rw OpamStateTypes.switch_state * OpamTypes.package_setA 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. If autolock is set to true, automatically update package from lock file if it was pinned with a lock file at first.
val pinned_package :
OpamStateTypes.rw OpamStateTypes.switch_state ->
?version:OpamTypes.version ->
?autolock:bool ->
?working_dir:bool ->
OpamTypes.name ->
((OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamStateTypes.rw OpamStateTypes.switch_state)
* bool)
OpamProcess.jobUpdates 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. If autolock is set to true, automatically update package from lock file if it was pinned with a lock file at first.
val download_package_source :
'a OpamStateTypes.switch_state ->
OpamTypes.package ->
OpamTypes.dirname ->
(string OpamTypes.download option * (string * string OpamTypes.download) list)
OpamProcess.jobDownload 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. If an archive is not found, it launches Software Heritage fallback (see OpamDownload.SWHID).
Stops on first error. The extra downloads list is reverted, so that the error is always first if any.
Does not print the results as it used to.
As download_package_source but for several packages sharing the same source. If url is None, do nothing. Downloads and synchronise upstream source in their respective source directories.
val cleanup_source :
'a OpamStateTypes.switch_state ->
OpamFile.OPAM.t option ->
OpamFile.OPAM.t ->
unitcleanup_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 ->
?subpath:OpamTypes.subpath ->
OpamTypes.package ->
unit OpamTypes.download OpamProcess.jobLow-level function to retrieve the package source into its local cache