package opam-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Defines on-disk package repositories, synchronised with an upstream

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)

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

Sort a collection of repositories by priority

Generate a package index from a collection of repositories

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

Initialize $opam/repo/$repo

Update $opam/repo/$repo.

val check_version : OpamTypes.repository -> unit OpamProcess.job

Error and exit on incompatible version

Download an url. Several mirrors can be provided, in which case they will be tried in order in case of an error.

Pull and fix the resulting digest

Pull an archive in a repository

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)
OCaml

Innovation. Community. Security.