Module Dose_algo.Depsolver
val load : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> solverinitialize the solver.
val is_consistent : Cudf.universe -> Diagnostic.diagnosischeck if the universe universe is consistent (all installed packages are coinstallable) This function is a wrapper of Cudf_checker.is_consistent.
val edos_install : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package -> Diagnostic.diagnosischeck if the given package can be installed in the universe
Packages marked as `Keep_package must be always installed.
val edos_coinstall : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package list -> Diagnostic.diagnosischeck if the give package list can be installed in the universe
val edos_coinstall_prod : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package list list -> Diagnostic.diagnosis listaccept a list of list of packages and return the coinstallability test of the cartesian product.
val trim : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.universeremove uninstallable packages from the universe .
val trimlist : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package list -> Cudf.package listremove uninstallable packages from the pkglist.
val find_broken : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package listreturn the list of broken packages.
val find_installable : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package listreturn the list of installable packages.
val find_listbroken : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package list -> Cudf.package listreturn the list of broken packages.
val find_listinstallable : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> Cudf.universe -> Cudf.package list -> Cudf.package listreturn the list of installable packages.
val univcheck : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> ?callback:(Diagnostic.diagnosis -> unit) -> ?explain:bool -> Cudf.universe -> intunivcheckcheck if all packages in the universe can be installed. Since not all packages are directly tested for installation, if a packages is installable, the installation might be empty. To obtain an installation set for each installable packages, the correct procedure is to iter on the list of packages.- parameter callback
: execute a function for each package. This function can have side effects and can be used to collect the installation set or the failure reason.
- returns
the number of broken packages
val univcheck_lowmem : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> ?callback:(Diagnostic.diagnosis -> unit) -> ?explain:bool -> Cudf.universe -> intval listcheck : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> ?callback:(Diagnostic.diagnosis -> unit) -> ?explain:bool -> Cudf.universe -> Cudf.package list -> intlistcheck ~callback:c subuniverse lcheck if all packages inlcan be installed.Invariant : l is a subset of universe can be installed in the solver universe.
It is responsability of the user to pass listcheck an appropriate subuniverse`
- parameter callback
: execute a function for each package.
- returns
the number of broken packages
val dependency_closure : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> ?maxdepth:int -> ?conjunctive:bool -> Cudf.universe -> Cudf.package list -> Cudf.package listdependency_closure index lreturn the union of the dependency closure of all packages inl.- parameter maxdepth
the maximum cone depth (infinite by default)
- parameter conjunctive
consider only conjunctive dependencies (false by default)
- parameter universe
the package universe
- parameter pkglist
a subset of
universe
val reverse_dependencies : Cudf.universe -> Cudf.package list Dose_common.CudfAdd.Cudf_hashtbl.treverse_dependencies univcompute the reverse dependency list of all packages in the universeuniv
val reverse_dependency_closure : ?maxdepth:int -> Cudf.universe -> Cudf.package list -> Cudf.package listreverse_dependencies_closure univcompute the reverse dependency list of all packages inlin the universeuniv
val output_clauses : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> ?enc:enc -> Cudf.universe -> stringoutput_clauses enc univreturn a string encoded accordingly toenc(default cnf).
type depclean_result= Cudf.package * (Cudf_types.vpkglist * Cudf_types.vpkg * Cudf.package list) list * (Cudf_types.vpkg * Cudf.package list) listThe result of the depclean function is a tuple containing a package, a list of dependencies that are redundant and a list of conflicts that are redundant
val depclean : ?global_constraints:(Cudf_types.vpkglist * Cudf.package list) list -> ?callback:(depclean_result -> unit) -> Cudf.universe -> Cudf.package list -> depclean_result listFor each package
pinpackagelist,depclean univ packagelistdetect redundundant dependencies that refer to packages that are either missing or not co-installable together with the root packagep
type solver_result=|Sat of Cudf.preamble option * Cudf.universe|Unsat of Diagnostic.diagnosis option|Error of string
val add_dummy : Cudf.universe -> Cudf.request -> Cudf.package -> Cudf.universe * Cudf.packageval check_request : ?cmd:string -> ?criteria:string -> ?dummy:Cudf.package -> ?explain:bool -> Cudf.cudf -> solver_resultcheck_requestcheck if there exists a solution for the give cudf document if ?dummy is specified, adds this dummy package to the user request. This parameter is used to encode a list of 'essential' packages that must always be installed in the solution alongside with the user request. if ?cmd is specified, it will be used to call an external cudf solver to satisfy the request. if ?criteria is specified it will be used as optimization criteria. if ?explain is specified and there is no solution for the give request, the result will contain the failure reason.
val check_request_using : ?call_solver:(Cudf.cudf -> Cudf.preamble option * Cudf.universe) -> ?dummy:Cudf.package -> ?explain:bool -> Cudf.cudf -> solver_resultSame as
check_request, but allows to specify any function to call the external solver. It should raiseDepsolver.Unsaton failure.
val installation_graph : solution:Cudf.universe -> (Dose_common.CudfAdd.Cudf_set.t * Dose_common.CudfAdd.Cudf_set.t) -> Defaultgraphs.ActionGraph.G.tBuild the installation graph from a cudf solution universe and sets of packages to be installed/removed (see CudfAdd.make_summary)