Library of additional functions for the CUDF format.
Data structures:
A table to associate to each id the list of packages id that are in conflict with it. Reflexive conflicts are made explicit.
Like who_provides but returns a list of cudf ids
Like resolve_deps but returns a list of cudf ids
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"
pp ?decode from_cudf pkg
package pretty printer.
from_cudf
a function that gets a (name,cudfversion) pair and returns a
(name,realversion).
?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"
normalize_set l returns the list l without any duplicate element.