module Napkin: sig
.. end
Normalized Abstract PacKage INformation.
Provides a common datastructure for expressing package dependency information.
Readers for Debian or RPM-style metadata output a stream of package
structures.
type 'a
selector =
| |
Sel_LEQ of 'a |
| |
Sel_GEQ of 'a |
| |
Sel_LT of 'a |
| |
Sel_GT of 'a |
| |
Sel_EQ of 'a |
| |
Sel_ANY |
The type ('a, 'b) selector
represents a range of versions where type 'a
represents versions and 'b
represents glob patterns.
val map_selector : ('a -> 'b) -> 'a selector -> 'b selector
Maps over selectors.
type ('a, 'b, 'c)
versioned =
| |
Unit_version of ('a * 'b selector) |
| |
Glob_pattern of 'c |
A range of versions for a unit such as ocaml (>> 3.04) is represented by "ocaml", Sel_GT "3.04"
.
type ('a, 'b, 'c, 'd, 'e, 'f)
package = {
|
pk_unit : 'b ; |
|
pk_version : 'c ; |
|
pk_architecture : 'e ; |
|
pk_extra : 'a ; |
|
pk_size : int64 ; |
|
pk_installed_size : int64 ; |
|
pk_source : 'f ; |
|
pk_provides : ('b, 'c, 'd) versioned list ; |
|
pk_conflicts : ('b, 'c, 'd) versioned list ; |
|
pk_breaks : ('b, 'c, 'd) versioned list ; |
|
pk_replaces : ('b, 'c, 'd) versioned list ; |
|
pk_depends : ('b, 'c, 'd) versioned list list ; |
|
pk_pre_depends : ('b, 'c, 'd) versioned list list ; |
|
pk_suggests : ('b, 'c, 'd) versioned list list ; |
|
pk_recommends : ('b, 'c, 'd) versioned list list ; |
|
pk_enhances : ('b, 'c, 'd) versioned list list ; |
|
pk_essential : bool ; |
|
pk_build_essential : bool ; |
}
The main datastructure used to represent packages.
type
default_package = (unit, string, string, string, string, string * string) package
type
package_with_files = ((string * string) list, string, string, string, string, string * string)
package
val map : extra:('a -> 'b) ->
unit:('c -> 'd) ->
version:('e -> 'f) ->
glob:('g -> 'h) ->
architecture:('i -> 'j) ->
source:('k -> 'l) ->
('a, 'c, 'e, 'g, 'i, 'k) package ->
('b, 'd, 'f, 'h, 'j, 'l) package
val string_of_versioned : (string, string, string) versioned -> string
Returns a textual representation of a versioned range in Debian style.
val name : ('a, 'b, 'c, 'd, 'e, 'f) package -> 'b * 'c * 'e
Package names must be unique
type
channel = default_package Stream.t
Channels are streams of packages
val to_default_package : ('a, string, string, string, string, string * string) package ->
default_package
Convert a package with extras to a default package