Up

module Opam_admin_top

: sig

Small lib for writing opam-repo admin scripts

#
val repo : OpamTypes.repository

The current repo (taken from CWD !)

#
val packages : OpamPackage.Set.t

All defined packages in the current repo

#
val compilers : OpamCompiler.Set.t

All defined compilers in the current repo

#
type 'a action = [
| `Update of 'a
| `Remove
| `Keep
]
#
val iter_packages_gen : (OpamPackage.t -> prefix:string option -> opam:OpamFile.OPAM.t -> descr:OpamFile.Descr.t option -> url:OpamFile.URL.t option -> dot_install:OpamFile.Dot_install.t option -> OpamFile.OPAM.t * OpamFile.Descr.t action * OpamFile.URL.t action * OpamFile.Dot_install.t action) -> unit

Maps on the files of every package. Only changed files are written back to disk.

#
val filter_packages : string list -> OpamPackage.t -> bool

Turn a list of glob patterns into a proper filtering function on package names.

#
val iter_packages : ?filter:(OpamPackage.t -> bool) -> ?f:(OpamPackage.t -> string option -> OpamFile.OPAM.t -> unit) -> ?opam:(OpamPackage.t -> OpamFile.OPAM.t -> OpamFile.OPAM.t) -> ?descr:(OpamPackage.t -> OpamFile.Descr.t -> OpamFile.Descr.t) -> ?url:(OpamPackage.t -> OpamFile.URL.t -> OpamFile.URL.t) -> ?dot_install:(OpamPackage.t -> OpamFile.Dot_install.t -> OpamFile.Dot_install.t) -> unit -> unit

Quicker interface when considering a single type of file

#
val iter_compilers_gen : (OpamCompiler.t -> prefix:string option -> comp:OpamFile.Comp.t -> descr:OpamFile.Descr.t option -> OpamFile.Comp.t * OpamFile.Descr.t action) -> unit

Similarly for compiler descriptions

#
val filter_compilers : string list -> OpamCompiler.t -> bool

Turn a list of glob patterns into a proper filtering function on compiler names.

#
val iter_compilers : ?filter:(OpamCompiler.t -> bool) -> ?f:(OpamCompiler.t -> string option -> OpamFile.Comp.t -> unit) -> ?comp:(OpamCompiler.t -> OpamFile.Comp.t -> OpamFile.Comp.t) -> ?descr:(OpamCompiler.t -> OpamFile.Descr.t -> OpamFile.Descr.t) -> unit -> unit
end