package opam-lib

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

OPAM actions

val download_package : OpamState.Types.t -> OpamTypes.package -> [ `Error of string | `Successful of OpamTypes.generic_file option ] OpamProcess.job

Downloads the source for a package to the local cache. Returns the file or dir downloaded, or None if the download failed.

val extract_package : OpamState.Types.t -> OpamTypes.generic_file option -> OpamTypes.package -> unit

Extracts and patches the source of a package

val build_package : OpamState.Types.t -> OpamTypes.generic_file option -> OpamTypes.package -> exn option OpamProcess.job

Build a package from its downloaded source. Returns None on success, Some exn on error.

val install_package : OpamState.Types.t -> OpamTypes.package -> exn option OpamProcess.job

Installs a compiled package from its build dir. Returns None on success, Some exn on error.

val removal_needs_download : OpamState.Types.t -> OpamTypes.package -> bool

Find out if the package source is needed for uninstall

val remove_package : OpamState.Types.t -> metadata:bool -> ?keep_build:bool -> ?silent:bool -> OpamTypes.package -> unit OpamProcess.job

Remove a package.

val cleanup_package_artefacts : OpamState.Types.t -> OpamTypes.package -> unit

Removes auxiliary files related to a package, after checking that they're not needed (even in other switches)

Compute the set of packages which will need to be downloaded to apply a solution. Takes a graph of atomic actions.

val update_metadata : OpamState.Types.t -> installed:OpamTypes.package_set -> installed_roots:OpamTypes.package_set -> reinstall:OpamTypes.package_set -> OpamState.Types.t

Update package metadata

OCaml

Innovation. Community. Security.