module Cudf:sig..end
type package = {
|
package : |
|
version : |
|
depends : |
|
conflicts : |
|
provides : |
|
installed : |
|
was_installed : |
|
keep : |
|
pkg_extra : |
With this representation, optional properties have already been
expanded to their default values (if they have one). It is not
possible to know whether they were present or not in the CUDF
syntax.
val (=%) : package -> package -> boolval (<%) : package -> package -> intPervasives.compare; useful for
sorting.val (>%) : package -> package -> intCudf.(<%), but sort with greater versions first.type request = {
|
request_id : |
|
install : |
|
remove : |
|
upgrade : |
|
req_extra : |
type preamble = {
|
preamble_id : |
(* |
text following the "preamble: " postmark
| *) |
|
property : |
(* |
extra property declarations
| *) |
|
univ_checksum : |
(* |
universe checksum
| *) |
|
status_checksum : |
(* |
status checksum
| *) |
|
req_checksum : |
(* |
request checksum
| *) |
val default_preamble : preambleval default_package : packageval default_request : requesttypecudf_doc =preamble option * package list * request
typecudf_item =[ `Package of package
| `Preamble of preamble
| `Request of request ]
exception Constraint_violation of string
type universe
typecudf =preamble * universe * request
typesolution =preamble * universe
A universe encoding a solution matters only for its installed
packages, which are considered to be the resulting package
status
val load_universe : package list -> universeConstraint_violation when a global CUDF constraint is violated in
the given package listval add_package : universe -> package -> unitConstraint_violation if a package with the same name and version is
alreayd in the given universeval remove_package : universe -> Cudf_types.pkgname * Cudf_types.version -> unitval lookup_package : universe -> Cudf_types.pkgname * Cudf_types.version -> packageNot_found if the requested package cannot be foundval mem_package : universe -> Cudf_types.pkgname * Cudf_types.version -> boolval mem_installed : ?include_features:bool ->
?ignore:(package -> bool) -> universe -> Cudf_types.vpkg -> boolinstalled packages)include_features : allow constraint to be satisfied by features
(i.e., Provides). Default: trueignore : make the lookup skip over all packages matching the given
package predicate. Default: do not ignore any packageval who_provides : ?installed:bool ->
universe ->
Cudf_types.vpkg -> (package * Cudf_types.version option) listv of the
feature.installed : : consider only installed packages (default)val lookup_packages : ?filter:Cudf_types.constr ->
universe -> Cudf_types.pkgname -> package listfilter : filter the found packages according to the given
version constraint. Default: None (i.e., no filtering)val get_installed : universe -> Cudf_types.pkgname -> package listlookup_packages composed with filtering on installed=trueval uid_by_package : universe -> package -> intNot_found if the given package cannot be found in the universeval package_by_uid : universe -> int -> packageNot_found if no package in the universe corresponds to the given
unique identifierval iter_packages : (package -> unit) -> universe -> unitval fold_packages : ('a -> package -> 'a) -> 'a -> universe -> 'aval iteri_packages : (int -> package -> unit) -> universe -> unitval iter_packages_by_name : (Cudf_types.pkgname -> package list -> unit) -> universe -> unitval fold_packages_by_name : ('a -> Cudf_types.pkgname -> package list -> 'a) ->
'a -> universe -> 'aval package_names : universe -> Cudf_types.pkgname listval get_packages : ?filter:(package -> bool) -> universe -> package listfilter : only return packages matching a given
predicate. Default is to return all packagesval universe_size : universe -> intval installed_size : universe -> intval status : universe -> universe
Inefficient (involves Hashtbl.t cloning), use with care.
val lookup_package_property : package -> string -> stringCudf_types) value as a stringNot_found if the given property name is not associated to
the given package (note that "being associated with" does not
necessarily mean that the property appears in the stanza, due to
default values)val lookup_request_property : request -> string -> stringCudf.lookup_package_property, but acting on request
information items.
To lookup the request identifier as a string (which strictly
speaking is not a property) you should lookup "request"
val lookup_preamble_property : preamble -> string -> stringCudf.lookup_package_property, but acting on preamble
information items.
To lookup the preamble identifier as a string (which strictly
speaking is not a property) you should lookup "preamble"
val lookup_typed_package_property : package -> string -> Cudf_types.typed_valueCudf.lookup_package_property, but return a typed value.val lookup_typed_request_property : request -> string -> Cudf_types.typed_valueCudf.lookup_request_property, but return a typed value.val lookup_typed_preamble_property : preamble -> string -> Cudf_types.typed_valueCudf.lookup_preamble_property, but return a typed value.val lookup_package_typedecl : ?extra:Cudf_types.typedecl -> string -> Cudf_types.typedecl1Not_found if no declaration could be found for the given propertyval version_matches : Cudf_types.version -> Cudf_types.constr -> boolversion_matches 1 (Some(`Eq, 2)) = falseval (|=) : Cudf_types.version -> Cudf_types.constr -> boolCudf.version_matches