Module Conex_opam_repository_layout

module Conex_opam_repository_layout: sig .. end
Opam repository layout

The core of conex is agnostic towards the repository layout - it needs some functions to Conex_opam_repository_layout.categorise received patches into packages, authorisations, and identities.



Opam repository layout

The core of conex is agnostic towards the repository layout - it needs some functions to Conex_opam_repository_layout.categorise received patches into packages, authorisations, and identities.

val valid_id : Conex_resource.identifier -> bool
valid_id id returns true if id is valid: this calls String.is_ascii id.
val valid_name : Conex_resource.identifier -> bool
valid_name name returns true if name is valid: either it is '-' or '_' or String.is_ascii name.
val authorisation_of_package : Conex_resource.name -> Conex_resource.name option
authorisation_of_package n returns either Some n', where n' is the prefix of n up until the first '.' (which separates package name from version suffix), or None.
val data_path : Conex_utils.path
data_path is the path from repository root to packages, "packages".
val id_path : Conex_utils.path
id_path is the path where identities are stored, at the moment "id".
val id_file : Conex_resource.identifier -> Conex_utils.path
id_file id is the path to the specific id (thus "id/foo" for identifier foo.
val authorisation_path : Conex_resource.name -> Conex_utils.path
authorisation_path name is the full path where the "authorisation" file for name is stored. Currently data_dir; name; "authorisation".
val package_path : Conex_resource.name -> Conex_utils.path
package_path name is the full path where the "package" file for name is stored. Currently data_dir; name; "package".
val release_filename : Conex_resource.name
release_filename is "release".
val release_dir : Conex_resource.name -> Conex_utils.path
release_dir name is data_dir; Conex_opam_repository_layout.authorisation_of_package (if None, name), followed by name.
val release_path : Conex_resource.name -> Conex_utils.path
release_path name is release_dir @ release_filename.
val categorise : Conex_utils.path ->
[ `Authorisation of Conex_resource.identifier
| `Compiler of Conex_resource.name * Conex_resource.name
| `Id of Conex_resource.identifier
| `Package of Conex_resource.name
| `Release of Conex_resource.name * Conex_resource.name
| `Unknown ]
categorise path identifies which resource owns the given path.