N0REP0
### <pkg:foo.1>
opam-version: "2.0"
install: ["touch" "%{lib}%/foo.1"]
### <pkg:bar.1>
opam-version: "2.0"
depends: "foo" {= "1"}
### <pkg:baz.1>
opam-version: "2.0"
### OPAMYES=1
### opam switch create sw --empty
### opam install bar
The following actions will be performed:
=== install 2 packages
  - install bar 1
  - install foo 1 [required by bar]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed foo.1
-> installed bar.1
Done.
### <pkg:foo.1>
opam-version: "2.0"
available: false
### opam reinstall foo
[ERROR] foo: unmet availability conditions: 'false'
# Return code 5 #
### : no action should be triggered on foo
### opam install baz --show
The following actions would be performed:
=== install 1 package
  - install baz 1
### opam reinstall --list-pending
foo.1
### opam upgrade --show
The following actions would be performed:
=== remove 2 packages
  - remove bar 1 [uses foo]
  - remove foo 1 [no longer available]
### opam upgrade --show --fixup
The following actions would be performed:
=== remove 2 packages
  - remove bar 1 [uses foo]
  - remove foo 1 [no longer available]
### : dependency foo is installed but no longer available
### opam upgrade bar
[ERROR] Package conflict!
  * Missing dependency:
    - bar -> foo -> foo.1: no longer available

# Return code 20 #
### opam clean -s
Cleaning up switch sw
### opam upgrade bar
[ERROR] Package conflict!
  * Missing dependency:
    - bar -> foo -> foo.1: no longer available

# Return code 20 #
### : replay the same sequence but with another version of `foo` present
### <pkg:foo.2>
opam-version: "2.0"
### opam upgrade --show
The following actions would be performed:
=== remove 1 package
  - remove  bar 1      [conflicts with foo]
=== upgrade 1 package
  - upgrade foo 1 to 2
### <pkg:bar.2>
opam-version: "2.0"
depends: "foo" {>= "1"}
### opam upgrade --show
The following actions would be performed:
=== upgrade 2 packages
  - upgrade bar 1 to 2
  - upgrade foo 1 to 2
### opam upgrade --show --fixup
The following actions would be performed:
=== upgrade 2 packages
  - upgrade bar 1 to 2
  - upgrade foo 1 to 2 [required by bar]
### opam reinstall baz
baz is not installed. Install it? [y/n] y
The following actions will be performed:
=== install 1 package
  - install baz 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed baz.1
Done.
### opam upgrade bar
The following actions will be performed:
=== upgrade 2 packages
  - upgrade bar 1 to 2
  - upgrade foo 1 to 2 [required by bar]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   bar.1
-> removed   foo.1
-> installed foo.2
-> installed bar.2
Done.
