OpamPinCommandFunctions handling the "opam pin" subcommand
val version_pin :
OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamTypes.name ->
OpamTypes.version ->
OpamStateTypes.rw OpamStateTypes.switch_statePins a package to the given version, and writes to disk. Returns the updated state. The main difference with source_pin is that a definition overlay is not created. Therefore, the package must exist already.
val source_pin :
OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamTypes.name ->
?version:OpamTypes.version ->
?edit:bool ->
?opam:OpamFile.OPAM.t ->
?quiet:bool ->
?force:bool ->
?ignore_extra_pins:bool ->
?subpath:OpamTypes.subpath ->
?locked:string ->
OpamTypes.url option ->
OpamStateTypes.rw OpamStateTypes.switch_stateSets the package as pinned to the given target. A package definition is looked for in the package source and current metadata (in this order), unless specified using ~opam.
If edit, or if no package definition is found, this opens an editor (with a template if no definition is available).
If force, don't abort even if the source can't be fetched from target
val pin_current :
OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamTypes.package ->
OpamStateTypes.rw OpamStateTypes.switch_statePins a package to its currently installed version
val handle_pin_depends :
OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamTypes.package ->
OpamFile.OPAM.t ->
OpamStateTypes.rw OpamStateTypes.switch_stateInteractively handles the pin-depends in an opam file
val fetch_all_pins :
'a OpamStateTypes.switch_state ->
?working_dir:bool ->
OpamStateTypes.pinned_opam list ->
OpamStateTypes.pinned_opam listFetch in parallel jobs a list of pins name, url, subpath, and return the successful ones. Ask for confirmation to continue if a fetching fails.
val edit :
OpamStateTypes.rw OpamStateTypes.switch_state ->
?version:OpamTypes.version ->
OpamTypes.name ->
OpamStateTypes.rw OpamStateTypes.switch_stateLet the user edit a pinned package's opam file. If given, the version is put into the template in advance. Writes and returns the updated switch state.
val unpin :
OpamStateTypes.rw OpamStateTypes.switch_state ->
OpamTypes.name list ->
OpamStateTypes.rw OpamStateTypes.switch_stateUnpin packages
val unpin_one :
'a OpamStateTypes.switch_state ->
OpamTypes.package ->
'a OpamStateTypes.switch_statePure function that reverts a single package pinning
val list : 'a OpamStateTypes.switch_state -> short:bool -> unitList the pinned packages to the user.
val scan :
normalise:bool ->
recurse:bool ->
?subpath:OpamTypes.subpath ->
OpamTypes.url ->
unitScan for available packages to pin, and display it on stdout. If normalise is true, displays it's normalised format `name.versionscan_sepurlscan_sepsubpath`.
val parse_pins : string list -> OpamStateTypes.pinned_opam listParse the normalised form of scan, and returns pinning informations.
val read_opam_file_for_pinning :
?locked:string ->
?quiet:bool ->
OpamTypes.name ->
OpamFile.OPAM.t OpamFile.t ->
OpamTypes.url ->
OpamFile.OPAM.t optionLints the given opam file, prints warnings or errors accordingly (unless quiet), upgrades it to current format, adds references to files below the 'files/' subdir (unless the file is directly below the specified, local url), and returns it
val default_version :
'a OpamStateTypes.switch_state ->
OpamTypes.name ->
OpamTypes.versionThe default version for pinning a package: depends on the state, what is installed and available, and defaults to ~dev.