package opam-client

  1. Overview
  2. Docs

Module OpamLockCommandSource

Functions handling the "opam lock" command

Sourceval select_packages : [ `Atom of OpamTypes.atom | `Filename of OpamTypes.filename | `Dirname of OpamTypes.dirname ] list -> 'a OpamStateTypes.switch_state -> 'a OpamStateTypes.switch_state * OpamTypes.package_set

Select packages to lock. If a package have at least one of its direct dependencies not installed in the switch, it is dropped. Returns the state with non present packages pinned, and kept packages.

Sourceval lock_opam : only_direct:bool -> keep_local:bool -> 'a OpamStateTypes.switch_state -> OpamFile.OPAM.t -> OpamFile.OPAM.t

Returns the locked opam file, according its depends, depopts, and pins. If only_direct is set to true, it only adds direct dependencies specified in the opam file. If keep_local is set to true, local pins are not resolved to a distant url and they are all added with their local path in 'pin_depends:' field.

OCaml

Innovation. Community. Security.