Module Sources

module Sources: sig .. end
Representation of a parsed source description item. all fields are string

include struct ... end
type source = {
   name : Format822.name;
   version : Format822.version;
   architecture : Format822.architecture list;
   binaries : string list;
   build_depends : Format822.builddepsformula;
   build_depends_indep : Format822.builddepsformula;
   build_depends_arch : Format822.builddepsformula;
   build_conflicts : Format822.builddepslist;
   build_conflicts_indep : Format822.builddepslist;
   build_conflicts_arch : Format822.builddepslist;
}
val default_source : source
val parse_s : ?opt:'a ->
?err:string ->
?multi:bool -> ('b * 'c -> 'a) -> string -> (string * ('b * 'c)) list -> 'a
val parse_name : Format822.loc * Format822.architecture -> Format822.name
val parse_version : Format822.loc * Format822.architecture -> Format822.version
val parse_builddepslist : Format822.loc * Format822.architecture -> Format822.builddepslist
val parse_builddepsformula : Format822.loc * Format822.architecture -> Format822.builddepsformula
val parse_architectures : string list -> Format822.loc * string -> Format822.architecture list
val parse_package_stanza : ((string * (Format822.loc * Format822.architecture)) list -> bool) option ->
string list ->
(string * (Format822.loc * Format822.architecture)) list ->
source option
val parse_sources_in : ?filter:((string * (Format822.loc * Format822.architecture)) list -> bool) ->
?archs:string list -> string -> IO.input -> source list
parse a debian Sources file from channel
val input_raw : ?filter:((string * (Format822.loc * Format822.architecture)) list -> bool) ->
?archs:string list -> string list -> source list
parse a debian Sources file. ~archs determines which which architectures should be considered while parsing the Souces file. if ~arch is [] then all archs are cosidered
val sep : string
val matcharch : string -> (bool * string) list -> bool
val matchprofile : 'a list -> (bool * 'a) list list -> bool
val select : string ->
'a list -> 'b * (bool * string) list * (bool * 'a) list list -> 'b option
val sources2packages : ?profiles:Format822.buildprofile list ->
?noindep:bool ->
?src:string ->
Format822.architecture ->
Format822.architecture -> source list -> Packages.package list
transform a list of sources packages into dummy binary packages. * This function preserve the order
val is_source : ?src:string -> Packages.package -> bool
Check if a package is of "Type" source as encoded by the function sources2packages
exception MismatchSrc of Cudf.package list
exception NotfoundSrc
val get_src_package : Cudf.universe -> Cudf.package -> Cudf.package
get_src_package universe binpkg returns the source package associate with the given binary package.

precondition : the package has "type" bin and the universe contains packages of "type" src encoded with sources2packages.

Raise MismatchSrc if there exists a source package with the same name but with a different version . Raise NotfoundSrc if the univese does not contain either a source package associated with the binary package or a source package with the same name but different version.

val srcbin_table : Cudf.universe ->
Cudf.package list Pervasives.ref Common.CudfAdd.Cudf_hashtbl.t
Returns an hash table that associates source packages (encoded by the function sources2packages) to binary packages in the universe. It is possible that a source package is not associated with any binary packages.
val get_bin_packages : 'a Pervasives.ref Common.CudfAdd.Cudf_hashtbl.t ->
Common.CudfAdd.Cudf_hashtbl.key -> 'a
Returns the list of binary packages associated to a package of "Type" source encoded by the function sources2packages. The table h associated each source with a list of binaries
val binset : ('a -> Common.CudfAdd.Cudf_set.elt list) ->
'a list -> Common.CudfAdd.Cudf_set.t
Returns the set of binary packages generated by the packages in srclist. The function get_bin_packages gets a source package and returns the set of packages associated to it. If the source package is not known, then it is ignored.