The opam cli is versioned. We want to support opam 2.0 and therefore have to define an OPAMCLI environment variable, ignored by opam 2.0, and making opam>2.0 use the opam 2.0 cli.
This environment variable is added to opam_opts's environment as it is only the Opam module which can decide which version to use.
Previous
ser@d6ed97d05644:~$ ocaml-platform -vv
ocaml-platform: [DEBUG] Running: 'opam' 'config' 'var' 'ocaml:compiler' '--yes' '-q' '--color=never' '--root' '/home/user/.opam'
ocaml-platform: [INFO] Error in 'opam' 'config' 'var' 'ocaml:compiler' '--yes' '-q' '--color=never' '--root' '/home/user/.opam':
[WARNING] var was deprecated in version 2.1 of the opam CLI. Use opam var instead or set OPAMCLI environment variable to 2.0.
ocaml-platform: [DEBUG] Running: 'opam' 'config' 'var' 'ocaml-system:version' '--yes' '-q' '--color=never' '--root' '/home/user/.opam'
ocaml-platform: [INFO] Error in 'opam' 'config' 'var' 'ocaml-system:version' '--yes' '-q' '--color=never' '--root' '/home/user/.opam':
[WARNING] var was deprecated in version 2.1 of the opam CLI. Use opam var instead or set OPAMCLI environment variable to 2.0.
The
opam
cli is versioned. We want to support opam 2.0 and therefore have to define anOPAMCLI
environment variable, ignored by opam 2.0, and making opam>2.0 use the opam 2.0 cli.This environment variable is added to
opam_opts
's environment as it is only theOpam
module which can decide which version to use.Previous
are no longer here!