package dose3
Install
Dune Dependency
Authors
Maintainers
Sources
md5=bc99cbcea8fca29dca3ebbee54be45e1
sha512=98dc4bd28e9f4aa8384be71b31783ae1afac577ea587118b8457b554ffe302c98e83d0098971e6b81803ee5c4f2befe3a98ef196d6b0da8feb4121e982ad5c2f
doc/dose3.common/Dose_common/CudfAdd/index.html
Module Dose_common.CudfAdd
Source
Library of additional functions for the CUDF format.
Basic comparison operations for packages
Equality test: two CUDF packages are equal if their names and versions are equal.
Compare function: compares two CUDF packages using standard CUDF comparison operator (i.e. comparing by their name and version).
Specialized data structures for CUDF packages
A hash function for CUDF packages, using only their name and version.
Sort function: sorts a CUDF packages list using the standard CUDF comparison operator in ascending order.
Data structures
Specialized hashtable for CUDF packages.
Specialized set data structure for CUDF packages.
Convert a list of CUDF packages to a set of CUDF packages.
Extended function on Cudf data types
Return the list of packages that that respect the given constraint
Return the list of packages satisfying the vpkg list
Returns the list of packages that are dependencies of the given package
A table to associate to each id the list of packages id that are in conflict with it. Reflexive conflicts are made explicit.
Create a ctable from a package universe
Return the list of packages in conflict with the given package
Like who_provides but returns a list of cudf ids
Like resolve_deps but returns a list of cudf ids
Functions to encode and decode strings.
Encode a string.
Replaces all the "not allowed" characters with their ASCII code (in hexadecimal format), prefixed with a '%' sign.
Only "allowed" characters are letters, numbers and these: @/+().-
, all the others are replaced.
Examples:
encode "ab" = "ab"
encode "|" = "%7c"
encode "a|b" = "a%7cb"
Decode a string. Opposite of the encode
function.
Replaces all the encoded "not allowed" characters in the string by their original (i.e. not encoded) versions.
Examples:
decode "ab" = "ab"
decode "%7c" = "|"
decode "a%7cb" = "a|b"
Additional functions on the CUDF data types.
Returns a list of packages containing for each package n
most recent version (default the latest version)
Set of strings
Returns the set of all names in the given universe
Add a new property to the given cudf preamble
return the value of the requested property. * emit a warning and raise Not_found if the property does not exist
Returns true if the package is essential, that is the cudf package has a extra property named "essential" and its value is "yes"
val realversionmap :
Cudf.package list ->
(Cudf_types.pkgname * string, Cudf.package) ExtLib.Hashtbl.t
build a hash table that associates (package name, String version) to CUDF packages
Return the unique cudf id of a package in a universe
Given a universe and a cudf id returns the corresponding package. Raise Not_found if the id does not correspond to a package.
normalize_set l returns the list l without any duplicate element.
Check if a CUDF version is nan
Version constant for impossible constraint
Formatting, printing, converting to string.
return a string containg either the value of the optional field "number" or the cudf version
return a string of the form "name ( = version)"
val pp :
((Cudf_types.pkgname * Cudf_types.version) ->
string * string option * string) ->
?fields:string list ->
?decode:(Cudf_types.pkgname -> string) ->
pp
pp ?decode from_cudf pkg
package pretty printer. from_cudf
a function that gets a (name,cudfversion) pair and returns a (name,realversion). ?fields
additional fields to print. ?decode
a function that decode the package name and version.
returns : a pair (name,versiom,property list)
note that if the package has version less then 0, then the version is printed as "nan"
default_pp
default package printer. Extracts string values from a cudf package : Name, Version, Fields. Where Fields is a list of field name , value pairs . If the version of the package is a negative number, the version version if printed as "nan".
cudf vpkglist printer.
cudf vpkglist printer.
Compute the depenency cone of a list of packages