N0REP0
### <pkg:baz.1>
opam-version: "2.0"
flags: compiler
### <pkg:baz.2>
opam-version: "2.0"
flags: compiler
### opam option depext=false
Set to 'false' the field depext in global configuration
### opam switch install cli-versioning --empty
opam: install was removed in version 2.1 of the opam CLI, but version 2.2 has been requested. Use create instead or set OPAMCLI environment variable to 2.0.
# Return code 2 #
### OPAMCLI=2.0 opam switch install cli-versioning --empty
[WARNING] OPAMNODEPEXTS was ignored because CLI 2.0 was requested and it was introduced in 2.1.
### OPAMSHOW=1
### opam list --cli 31.4
[ERROR] opam command-line version 31.4 is not supported.
# Return code 2 #
### opam install baz --assume-depexts --cli 2.1
The following actions would be performed:
=== install 1 package
  - install baz 2
### OPAMCLI=2.0 opam install baz --assume-depexts
opam: --assume-depexts was added in version 2.1 of the opam CLI, but version 2.0 has been requested, which is older.
# Return code 2 #
### opam config set cli version
[WARNING] set was deprecated in version 2.1 of the opam CLI. Use opam var instead or set OPAMCLI environment variable to 2.0.
Added 'cli: "version"' to field variables in switch cli-versioning
### OPAMCLI=2.0 opam config set cli version
[WARNING] OPAMNODEPEXTS was ignored because CLI 2.0 was requested and it was introduced in 2.1.
Added 'cli: "version"' to field variables in switch cli-versioning
### OPAMSHOW=0 opam switch set-invariant baz.1 --no-action
The switch invariant was set to baz = 1
### OPAMCLI=2.0 opam install baz.2
[WARNING] OPAMNODEPEXTS was ignored because CLI 2.0 was requested and it was introduced in 2.1.
[ERROR] Package conflict!
  * No agreement on the version of baz:
    - (invariant) -> baz < 2
    - baz >= 2
    You can temporarily relax the switch invariant with `--update-invariant'

No solution found, exiting
# Return code 20 #
### opam install baz.2
[ERROR] Package conflict!
  * No agreement on the version of baz:
    - (invariant) -> baz < 2
    - baz >= 2
    You can temporarily relax the switch invariant with `--update-invariant'

No solution found, exiting
# Return code 20 #
### OPAMCLI=2.0 opam install baz.2 --update-invariant
opam: --update-invariant was added in version 2.1 of the opam CLI, but version 2.0 has been requested, which is older.
# Return code 2 #
### opam install baz.2 --update-invariant
The following actions would be performed:
=== install 1 package
  - install baz 2
### OPAMCLI=2.0 opam install baz.2 --unlock-base
[WARNING] OPAMNODEPEXTS was ignored because CLI 2.0 was requested and it was introduced in 2.1.
The following actions would be performed:
=== install 1 package
  - install baz 2
### opam install baz.2 --unlock-base
opam: --unlock-base was removed in version 2.1 of the opam CLI, but version 2.2 has been requested. Use --update-invariant instead or set OPAMCLI environment variable to 2.0.
# Return code 2 #
### # opam option uses mk_command_ret
### opam option foo
[ERROR] No option named 'foo' found. Use 'opam option [--global]' to list them
# Return code 2 #
### OPAMCLI=2.0 opam option foo
opam: option was added in version 2.1 of the opam CLI, but version 2.0 has been requested, which is older.
# Return code 2 #
### opam option foo --global
[ERROR] Field or section foo not found
# Return code 5 #
### OPAMCLI=2.0 opam option foo --global
opam: --global was added in version 2.1 of the opam CLI, but version 2.0 has been requested, which is older.
# Return code 2 #
### # opam lock uses mk_command
### opam lock foo
[ERROR] No package matching foo
# Return code 5 #
### OPAMCLI=2.0 opam lock foo
opam: lock was added in version 2.1 of the opam CLI, but version 2.0 has been requested, which is older.
# Return code 2 #
### # Check for build test env
### # Note: you must have an installed opam with cli version enabled to pass these tests
### OPAMSHOW=0
### <pkg:env-2-0.1>
opam-version: "2.0"
build: ["sh" "-c" "env | grep -qFx 'OPAMCLI=2.0'"]
install: ["sh" "-c" "env | grep -qFx 'OPAMCLI=2.0'"]
remove: ["sh" "-c" "env | grep -qFx 'OPAMCLI=2.0'"]
### <pkg:env-2-1.1>
opam-version: "2.0"
build-env: [OPAMCLI = "2.1"]
build: ["sh" "-c" "env | grep -qFx 'OPAMCLI=2.1'"]
install: ["sh" "-c" "env | grep -qFx 'OPAMCLI=2.1'"]
remove: ["sh" "-c" "env | grep -qFx 'OPAMCLI=2.1'"]
### opam switch set-invariant --formula "[]"
The switch invariant was set to []
### opam install env-2-0
The following actions will be performed:
=== install 1 package
  - install env-2-0 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed env-2-0.1
Done.
### opam install env-2-1
The following actions will be performed:
=== install 1 package
  - install env-2-1 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed env-2-1.1
Done.
### opam remove env-2-0
The following actions will be performed:
=== remove 1 package
  - remove env-2-0 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   env-2-0.1
Done.
### opam remove env-2-1
The following actions will be performed:
=== remove 1 package
  - remove env-2-1 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   env-2-1.1
Done.
### # Environement variables cli versioning
### OPAMBUILDDOC=1 opam var share
[WARNING] OPAMBUILDDOC was ignored because CLI 2.2 was requested and it was removed in 2.1, set OPAMCLI environment variable to 2.0.
${BASEDIR}/OPAM/cli-versioning/share
### OPAMCLI=2.0 OPAMBUILDDOC=1 opam config var share
[WARNING] OPAMNODEPEXTS was ignored because CLI 2.0 was requested and it was introduced in 2.1.
${BASEDIR}/OPAM/cli-versioning/share
### # Switch creation with packages & formulaes
### opam switch create errored baz --packages baz.2
[ERROR] Individual package and option '--packages' can not be specified at the same time. Use just '--packages' instead, e.g.
        opam switch create flambda --packages=ocaml.4.12.0,ocaml-option-flambda
        or '--formula'
        opam switch create flambda --formula='["ocaml" {="4.12.0"} "ocaml-option-flambda"]'
# Return code 2 #
### OPAMCLI=2.0 opam switch create working baz --packages baz.2 --show
[WARNING] OPAMNODEPEXTS was ignored because CLI 2.0 was requested and it was introduced in 2.1.

<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: ["baz" "baz" {= "2"}]
The following actions would be performed:
=== install 1 package
  - install baz 2
