Conex_opam_repository_layoutSourceOpam repository layout
The core of conex is agnostic towards the repository layout - it needs some functions to categorise received patches into packages, authorisations, and identities.
valid_id id returns true if id is valid: this calls String.is_ascii id.
valid_name name returns true if name is valid: either it is '-' or '_' or String.is_ascii name.
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.
data_path is the path from repository root to packages, "packages".
id_path is the path where identities are stored, at the moment "id".
id_file id is the path to the specific id (thus "id/foo" for identifier foo.
authorisation_path name is the full path where the "authorisation" file for name is stored. Currently data_dir; name; "authorisation".
package_path name is the full path where the "package" file for name is stored. Currently data_dir; name; "package".
release_filename is "release".
release_dir name is data_dir; authorisation_of_package (if None, name), followed by name.
release_path name is release_dir @ release_filename.
val categorise :
Conex_utils.path ->
[ `Id of Conex_resource.identifier
| `Authorisation of Conex_resource.identifier
| `Package of Conex_resource.name
| `Release of Conex_resource.name * Conex_resource.name
| `Compiler of Conex_resource.name * Conex_resource.name
| `Unknown ]categorise path identifies which resource owns the given path.