• en

Module OpamClient

module API : sig
OPAM API.
val init : OpamTypes.repository -> OpamTypes.compiler -> jobs:int -> OpamTypes.shell -> OpamTypes.filename -> TODO: a -> unit
Initialize the client a consistent state.
val list : print_short:bool -> filter:TODO: a -> order:TODO: b -> exact_name:bool -> case_sensitive:bool -> ?depends:OpamTypes.atom list -> ?reverse_depends:bool -> ?recursive_depends:bool -> ?depopts:bool -> ?depexts:string list -> string list -> unit
Display all available packages that matches any of the regexps.
val info : fields:string list -> raw_opam:bool -> OpamTypes.atom list -> unit
Display a general summary of a collection of packages.
val install : OpamTypes.atom list -> bool option -> bool -> unit
Install the given list of packages. Second argument, if not None, specifies that given packages should be added or removed from the roots. Third argument installs all dependencies but not the packages themselves
val reinstall : OpamTypes.atom list -> unit
Reinstall the given set of packages.
val update : repos_only:bool -> string list -> unit
Refresh the available packages.
val upgrade : OpamTypes.atom list -> unit
Find a consistent state where most of the installed packages are upgraded to their latest version, within the given constraints. An empty list means upgrade all installed packages.
val fixup : unit -> unit
Recovers from an inconsistent universe
val remove : autoremove:bool -> force:bool -> OpamTypes.atom list -> unit
Remove the given list of packages.
module CONFIG : sig
Config API.
val env : csh:bool -> sexp:bool -> fish:bool -> unit
Display environment.
val setup : OpamTypes.user_config option -> OpamTypes.global_config option -> unit
Global and user setup of OPAM.
val setup_list : OpamTypes.shell -> OpamTypes.filename -> unit
Display global and user informations about OPAM setup.
val exec : string list -> unit
Execute a command in a subshell with the right environment variables.
val list : OpamTypes.name list -> unit
Display variables and their contents.
val variable : OpamTypes.full_variable -> unit
Display a given variable content.
val subst : OpamTypes.basename list -> unit
Substitute files.
end
module REPOSITORY : sig
Repository API
val list : short:bool -> unit
Display the list of repositories.
val add : OpamTypes.repository_name -> OpamTypes.repository_kind -> OpamTypes.address -> priority:int option -> unit
Add a new repository.
val remove : OpamTypes.repository_name -> unit
Remove a repository.
val priority : OpamTypes.repository_name -> priority:int -> unit
Set-up repository priority.
val set_url : OpamTypes.repository_name -> OpamTypes.address -> unit
Set-up repository url.
end
module SWITCH : sig
Switch API
val switch : quiet:bool -> warning:bool -> OpamTypes.switch -> unit
Switch to the given compiler. Take the global file lock.
val install : quiet:bool -> warning:bool -> update_config:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
Install the given compiler.
val import : OpamTypes.filename option -> unit
Import the packages from a file. If no filename is specified, read stdin.
val export : OpamTypes.filename option -> unit
Export the packages to a file. If no filename is specified, write to stdout.
val remove : OpamTypes.switch -> unit
Remove the given compiler.
val reinstall : OpamTypes.switch -> unit
Reinstall the given compiler.
val list : print_short:bool -> installed:bool -> all:bool -> unit
List the available compiler descriptions.
val show : unit -> unit
Display the name of the current compiler.
end
module PIN : sig
Pin API
val pin : OpamPackage.Name.t -> ?edit:bool -> ?action:bool -> OpamTypes.pin_option option -> unit
Set a package pinning. if pin_option is None, set the package defined upstream. If action, prompt for install/reinstall as appropriate after pinning.
val edit : ?action:bool -> OpamPackage.Name.t -> unit
val unpin : ?action:bool -> OpamPackage.Name.t -> unit
val list : unit -> unit
List the current pinned packages.
end
end
val global_lock : unit -> unit -> unit
Call an unsafe function while taking the global lock.
val switch_lock : unit -> unit -> unit
Call an unsafe function while taking the current switch lock.
val read_lock : unit -> unit -> unit
Call an unsafe function while checking that no lock is already held.
val with_switch_backup : string -> OpamState.state -> unit -> unit
Loads state with command, and calls f on it. The loaded state is backed up, and in case of error, a message is displayed on how to revert.
module SafeAPI : sig
This version of the API can be used concurrently.
val init : OpamTypes.repository -> OpamTypes.compiler -> jobs:int -> OpamTypes.shell -> OpamTypes.filename -> TODO: a -> unit
Initialize the client a consistent state.
val list : print_short:bool -> filter:TODO: a -> order:TODO: b -> exact_name:bool -> case_sensitive:bool -> ?depends:OpamTypes.atom list -> ?reverse_depends:bool -> ?recursive_depends:bool -> ?depopts:bool -> ?depexts:string list -> string list -> unit
Display all available packages that matches any of the regexps.
val info : fields:string list -> raw_opam:bool -> OpamTypes.atom list -> unit
Display a general summary of a collection of packages.
val install : OpamTypes.atom list -> bool option -> bool -> unit
Install the given list of packages. Second argument, if not None, specifies that given packages should be added or removed from the roots. Third argument installs all dependencies but not the packages themselves
val reinstall : OpamTypes.atom list -> unit
Reinstall the given set of packages.
val update : repos_only:bool -> string list -> unit
Refresh the available packages.
val upgrade : OpamTypes.atom list -> unit
Find a consistent state where most of the installed packages are upgraded to their latest version, within the given constraints. An empty list means upgrade all installed packages.
val fixup : unit -> unit
Recovers from an inconsistent universe
val remove : autoremove:bool -> force:bool -> OpamTypes.atom list -> unit
Remove the given list of packages.
module CONFIG : sig
Config API.
val env : csh:bool -> sexp:bool -> fish:bool -> unit
Display environment.
val setup : OpamTypes.user_config option -> OpamTypes.global_config option -> unit
Global and user setup of OPAM.
val setup_list : OpamTypes.shell -> OpamTypes.filename -> unit
Display global and user informations about OPAM setup.
val exec : string list -> unit
Execute a command in a subshell with the right environment variables.
val list : OpamTypes.name list -> unit
Display variables and their contents.
val variable : OpamTypes.full_variable -> unit
Display a given variable content.
val subst : OpamTypes.basename list -> unit
Substitute files.
end
module REPOSITORY : sig
Repository API
val list : short:bool -> unit
Display the list of repositories.
val add : OpamTypes.repository_name -> OpamTypes.repository_kind -> OpamTypes.address -> priority:int option -> unit
Add a new repository.
val remove : OpamTypes.repository_name -> unit
Remove a repository.
val priority : OpamTypes.repository_name -> priority:int -> unit
Set-up repository priority.
val set_url : OpamTypes.repository_name -> OpamTypes.address -> unit
Set-up repository url.
end
module SWITCH : sig
Switch API
val switch : quiet:bool -> warning:bool -> OpamTypes.switch -> unit
Switch to the given compiler. Take the global file lock.
val install : quiet:bool -> warning:bool -> update_config:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
Install the given compiler.
val import : OpamTypes.filename option -> unit
Import the packages from a file. If no filename is specified, read stdin.
val export : OpamTypes.filename option -> unit
Export the packages to a file. If no filename is specified, write to stdout.
val remove : OpamTypes.switch -> unit
Remove the given compiler.
val reinstall : OpamTypes.switch -> unit
Reinstall the given compiler.
val list : print_short:bool -> installed:bool -> all:bool -> unit
List the available compiler descriptions.
val show : unit -> unit
Display the name of the current compiler.
end
module PIN : sig
Pin API
val pin : OpamPackage.Name.t -> ?edit:bool -> ?action:bool -> OpamTypes.pin_option option -> unit
Set a package pinning. if pin_option is None, set the package defined upstream. If action, prompt for install/reinstall as appropriate after pinning.
val edit : ?action:bool -> OpamPackage.Name.t -> unit
val unpin : ?action:bool -> OpamPackage.Name.t -> unit
val list : unit -> unit
List the current pinned packages.
end
end