package opam-lib

  1. Overview
  2. Docs
On This Page
  1. Solver
Legend:
Library
Module
Module type
Parameter
Class
Class type

SAT-solver for package dependencies and conflicts

type solution
val empty_universe : OpamTypes.universe

Solver

val string_of_request : OpamTypes.atom OpamTypes.request -> string

Convert a request to a string

val stats : solution -> OpamTypes.stats

Compute statistics about a solution

val new_packages : solution -> OpamTypes.package_set

Return the new packages in the solution

val string_of_stats : OpamTypes.stats -> string

Pretty-printing of statistics

val solution_is_empty : solution -> bool

Is the solution empty ?

val print_solution : messages:(OpamTypes.package -> string list) -> rewrite:(OpamTypes.package -> OpamTypes.package) -> requested:OpamTypes.name_set -> solution -> unit

Display a solution

Computes an opam->cudf version map from a set of package

val load_cudf_universe : ?depopts:bool -> build:bool -> OpamTypes.universe -> ?version_map:int OpamTypes.package_map -> OpamTypes.package_set -> Cudf.universe

Creates a CUDF universe from an OPAM universe, including the given packages

Given a description of packages, return a solution preserving the consistency of the initial description.

val get_atomic_action_graph : solution -> ActionGraph.t

Returns the graph of atomic actions (rm, inst) from a solution

Keep only the packages that are installable.

val dependencies : depopts:bool -> build:bool -> installed:bool -> ?unavailable:bool -> OpamTypes.universe -> OpamTypes.package_set -> OpamTypes.package list

Return the topological sort of the transitive dependency closures of a collection of packages.

val reverse_dependencies : depopts:bool -> build:bool -> installed:bool -> ?unavailable:bool -> OpamTypes.universe -> OpamTypes.package_set -> OpamTypes.package list

Same as dependencies but for reverse dependencies

val check_for_conflicts : OpamTypes.universe -> OpamCudf.conflict option

Check the current set of installed packages in a universe for inconsistencies

val dump_universe : OpamTypes.universe -> out_channel -> unit

Dumps a cudf file containing all available packages in the given universe, plus version bindings (as '#v2v' comments) for the other ones.

val filter_solution : (OpamTypes.package -> bool) -> solution -> solution

Filters actions in a solution. Dependents of a removed actions are removed to keep consistency

OCaml

Innovation. Community. Security.