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 ('name, 'version, 'glob)
versioned =
| |
Unit_version of ('name * 'version selector) |
| |
Glob_pattern of 'glob |
A range of versions for a unit such as ocaml (>> 3.04) is represented by "ocaml", Sel_GT "3.04"
.
type ('extra, 'unit, 'version, 'glob, 'architecture, 'source)
package = {
|
pk_unit : 'unit ; |
|
pk_version : 'version ; |
|
pk_architecture : 'architecture ; |
|
: 'extra ; |
|
pk_size : int64 ; |
|
pk_installed_size : int64 ; |
|
pk_source : 'source ; |
|
pk_provides : ('unit, 'version, 'glob) versioned list ; |
|
pk_conflicts : ('unit, 'version, 'glob) versioned list ; |
|
pk_breaks : ('unit, 'version, 'glob) versioned list ; |
|
pk_replaces : ('unit, 'version, 'glob) versioned list ; |
|
pk_depends : ('unit, 'version, 'glob) versioned list list ; |
|
pk_pre_depends : ('unit, 'version, 'glob) versioned list list ; |
|
pk_suggests : ('unit, 'version, 'glob) versioned list list ; |
|
pk_recommends : ('unit, 'version, 'glob) versioned list list ; |
|
pk_enhances : ('unit, 'version, 'glob) 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:('extra1 -> 'extra2) ->
unit:('unit1 -> 'unit2) ->
version:('version1 -> 'version2) ->
glob:('glob1 -> 'glob2) ->
architecture:('architecture1 -> 'architecture2) ->
source:('source1 -> 'source2) ->
('extra1, 'unit1, 'version1, 'glob1, 'architecture1, 'source1) package ->
('extra2, 'unit2, 'version2, 'glob2, 'architecture2, 'source2) package
val string_of_versioned : (string, string, string) versioned -> string
Returns a textual representation of a versioned range in Debian style.
val name : ('extra, 'unit, 'version, 'glob, 'architecture, 'source) package ->
'unit * 'version * 'architecture
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