package opam-lib
Install
Dune Dependency
Authors
-
TThomas Gazagnaire <thomas@gazagnaire.org>
-
AAnil Madhavapeddy <anil@recoil.org>
-
FFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
-
FFrederic Tuong <tuong@users.gforge.inria.fr>
-
LLouis Gesbert <louis.gesbert@ocamlpro.com>
-
GGuillem Rieu <guillem.rieu@ocamlpro.com>
-
VVincent Bernardoff <vb@luminar.eu.org>
-
RRoberto Di Cosmo <roberto@dicosmo.org>
Maintainers
Sources
sha256=625767c3465219cc8799aad1449c74279b31686db0821300cfdb92fbff17e9fd
md5=e0688c0cf9a55f93ee93f62d07cf6b74
doc/opam-lib.repository/OpamRepository/index.html
Module OpamRepository
Defines on-disk package repositories, synchronised with an upstream
val packages : OpamTypes.repository -> OpamTypes.package_set
Get the list of packages
val packages_with_prefixes :
OpamTypes.repository ->
string option OpamTypes.package_map
Get the list of packages (and their eventual prefixes)
val compilers : OpamTypes.repository -> OpamTypes.compiler_set
Get the list of all compiler
val compilers_with_prefixes :
OpamTypes.repository ->
string option OpamTypes.compiler_map
Get the list of compilers (and their eventual prefixes)
Repository Collection Operations
val sort :
OpamTypes.repository OpamTypes.repository_name_map ->
OpamTypes.repository list
Sort a collection of repositories by priority
val package_index :
OpamTypes.repository OpamTypes.repository_name_map ->
(OpamTypes.repository_name * string option) OpamTypes.package_map
Generate a package index from a collection of repositories
val compiler_index :
OpamTypes.repository OpamTypes.repository_name_map ->
(OpamTypes.repository_name * string option) OpamTypes.compiler_map
Generate a compiler index from a collection of repositories
State
val url_checksum : OpamFilename.t -> OpamTypes.checksums
Get the package archive checksum off an url file
val package_files :
OpamTypes.repository ->
string option ->
OpamTypes.package ->
archive:bool ->
OpamTypes.filename list
Get all the package files
val package_state :
OpamTypes.repository ->
string option ->
OpamTypes.package ->
[ `all | `partial of bool ] ->
OpamTypes.checksums
Compute a package state (ie. a list of checksums). If `partial archive
, only the checksum of the archive within the url file (instead of the file itself), of the files/ subdirectory, and of the archive if set are returned.
val compiler_files :
OpamTypes.repository ->
string option ->
OpamTypes.compiler ->
OpamTypes.filename list
Get all the compiler files
val compiler_state :
OpamTypes.repository ->
string option ->
OpamTypes.compiler ->
OpamTypes.checksums
Compute a compiler state (ie. a list of checksums).
Repository backends
val init : OpamTypes.repository -> unit OpamProcess.job
Initialize $opam/repo/$repo
val update : OpamTypes.repository -> unit OpamProcess.job
Update $opam/repo/$repo.
val check_version : OpamTypes.repository -> unit OpamProcess.job
Error and exit on incompatible version
val pull_url :
OpamTypes.repository_kind ->
OpamTypes.package ->
OpamTypes.dirname ->
string option ->
OpamTypes.address list ->
OpamTypes.generic_file OpamTypes.download OpamProcess.job
Download an url. Several mirrors can be provided, in which case they will be tried in order in case of an error.
val pull_url_and_fix_digest :
OpamTypes.repository_kind ->
OpamTypes.package ->
OpamTypes.dirname ->
string ->
OpamTypes.filename ->
OpamTypes.address list ->
OpamTypes.generic_file OpamTypes.download OpamProcess.job
Pull and fix the resulting digest
val pull_archive :
OpamTypes.repository ->
OpamTypes.package ->
OpamTypes.filename OpamTypes.download OpamProcess.job
Pull an archive in a repository
val revision : OpamTypes.repository -> OpamTypes.version option OpamProcess.job
Get the optional revision associated to a backend.
val make_archive :
?gener_digest:bool ->
OpamTypes.repository ->
string option ->
OpamTypes.package ->
unit OpamProcess.job
make_archive ?gener_digest repo prefix package
builds the archive for the given package
. By default, the digest that appears in $NAME.$VERSION/url is not modified, unless gener_digest
is set.
val find_backend : OpamTypes.repository -> (module OpamRepositoryBackend.S)
Find a backend
val find_backend_by_kind :
OpamTypes.repository_kind ->
(module OpamRepositoryBackend.S)