N0REP0
### <pkg:foo.1>
opam-version: "2.0"
build: ["opam" "option" "jobs" "--safe" "--cli=2.1"]
flags: compiler
### <pkg:bar.1>
opam-version: "2.0"
build: ["opam" "option" "jobs" "--safe" "--cli=2.1"]
### <pkg:baz.1>
opam-version: "2.0"
flags: compiler
build: ["sh" "./prefix"]
install: ["cp" "pref" "%{lib}%/prefix"]
### <pkg:baz.1:prefix>
opam var prefix --safe > pref
### # switch not undefined for opam calls in build, on build creation
### opam switch create undef-prefix baz

<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: ["baz"]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed baz.1
Done.
### cat $OPAMROOT/undef-prefix/lib/prefix
${BASEDIR}/OPAM/undef-prefix
### # No deadlock on concurent opam calls in build
### opam switch create nohang foo bar | unordered

<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: ["foo" "bar"]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed bar.1
-> installed foo.1
Done.
### # switch propagation to opam calls in build
### opam switch create undef-switch --empty
### opam switch nohang
### opam install baz --sw undef-switch
The following actions will be performed:
=== install 1 package
  - install baz 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed baz.1
Done.
### cat $OPAMROOT/undef-switch/lib/prefix
${BASEDIR}/OPAM/undef-switch
### # switch with repo link
### # expects a warning, useful to check chosen backend
### opam switch create w-repo --repositories=from-link=https://github.com/ocaml/opam-repository.git --dry-run --empty
Creating repository from-link...
[from-link] Initialised
[WARNING] The repository 'from-link' at git+https://github.com/ocaml/opam-repository.git doesn't have a 'repo' file, and might not be compatible with this version of opam.
[NOTE] Repository at git+https://github.com/ocaml/opam-repository.git doesn't define its version, assuming it's 1.2.

<><> Upgrading repositories from older opam format ><><><><><><><><><><><><><><>
Upgrading repository "from-link"...
