Module Waterway


module Waterway: sig .. end
Glues RAPIDS and various parser modules to provide a convenient way of loading a RAPIDS database.


type waterway =
| File of string
| Directory of string
| Dose of string
A waterway is a way to get the liquid we are interested in. This can be in a DOSEbase(TM), a file (which will be a Debian APT list or an hdlist), or a structured collection of such files.
type specification = (Rapids.liquid * waterway) list 
It is possible to load multiple waterways at once, provided they have the same liquid. This is given as a list, whose components must all have the same liquid. Yes, this could have been factored but it is not very important and simpler that way.

The textual representation of a specifications is a comma-separated list as below:

(deb|dose|rpm|doserpm):filename(,(deb|dose|rpm|doserpm):filename)*

For example:

dose:/tmp/dose,deb:/var/lib/apt/lists/ftp.fr.debian.org_debian_dists_testing_main_binary-i386_Packages

is a valid specification.

val specification_of_string : string -> specification
val merge : Rapids.db ->
?progress:Progress.indicator ->
?add_file_conflicts:bool -> ?overlay:bool -> specification -> unit
Merge a waterway into the given database.

Call with_database sl handler where sl is a waterstream specification and handler is your function.