N0REP0
### OPAMYES=1 OPAMJOBS=1
### <pin:ongoing/ongoing.opam>
opam-version: "2.0"
build: [[ "test" "-f" "ongoing.txt" ] [ "cat" "ongoing.txt" ]]
### <ongoing/ongoing.txt>
versionned
### git -C ./ongoing init -q --initial-branch=master
### git -C ./ongoing config core.autocrlf false
### git -C ./ongoing add -A
### git -C ./ongoing commit -qm "init"
### opam switch create working-dir --empty
### opam pin ./ongoing
Package ongoing does not exist, create as a NEW package? [y/n] y
ongoing is now pinned to git+file://${BASEDIR}/ongoing#master (version dev)

The following actions will be performed:
=== install 1 package
  - install ongoing dev (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved ongoing.dev  (no changes)
-> installed ongoing.dev
Done.
### <ongoing/newfile.txt>
new!
### <pin:ongoing/ongoing.opam>
opam-version: "2.0"
build: [[ "test" "-f" "newfile.txt" ] [ "cat" "newfile.txt" ]]
### opam remove ongoing
The following actions will be performed:
=== remove 1 package
  - remove ongoing dev (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   ongoing.dev
Done.
### opam install ongoing -v | sed-cmd test | sed-cmd cat

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
Processing  1/1:
[NOTE] Ignoring uncommitted changes in ${BASEDIR}/ongoing (`--working-dir' not specified or specified with no argument).
Processing  1/1: [ongoing.dev: git]
[ongoing.dev] synchronised (no changes)

The following actions will be performed:
=== install 1 package
  - install ongoing dev (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Processing  1/3: [ongoing.dev: git]
-> retrieved ongoing.dev  (no changes)
Processing  2/3: [ongoing: test ongoing.txt]
+ test "-f" "ongoing.txt" (CWD=${BASEDIR}/OPAM/working-dir/.opam-switch/build/ongoing.dev)
Processing  2/3: [ongoing: cat ongoing.txt]
+ cat "ongoing.txt" (CWD=${BASEDIR}/OPAM/working-dir/.opam-switch/build/ongoing.dev)
- versionned
-> compiled  ongoing.dev
-> installed ongoing.dev
Done.
### opam install ongoing --working-dir -v | sed-cmd test | sed-cmd cat

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
Processing  1/1: [ongoing.dev: git]
[ongoing.dev] synchronised (git+file://${BASEDIR}/ongoing#master)
[ongoing] Installing new package description from upstream git+file://${BASEDIR}/ongoing#master

The following actions will be performed:
=== recompile 1 package
  - recompile ongoing dev (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Processing  1/3: [ongoing: test newfile.txt]
+ test "-f" "newfile.txt" (CWD=${BASEDIR}/OPAM/working-dir/.opam-switch/build/ongoing.dev)
Processing  1/3: [ongoing: cat newfile.txt]
+ cat "newfile.txt" (CWD=${BASEDIR}/OPAM/working-dir/.opam-switch/build/ongoing.dev)
- new!
-> compiled  ongoing.dev
-> removed   ongoing.dev
-> installed ongoing.dev
Done.
### git -C ./ongoing add ongoing.opam
### git -C ./ongoing commit -qm "forgot a file"
### opam remove ongoing
The following actions will be performed:
=== remove 1 package
  - remove ongoing dev (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   ongoing.dev
Done.
### opam install ongoing -v | grep -v "^#" | sed-cmd test

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
Processing  1/1:
[NOTE] Ignoring uncommitted changes in ${BASEDIR}/ongoing (`--working-dir' not specified or specified with no argument).
Processing  1/1: [ongoing.dev: git]
[ongoing.dev] synchronised (no changes)

The following actions will be performed:
=== install 1 package
  - install ongoing dev (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Processing  1/3: [ongoing.dev: git]
-> retrieved ongoing.dev  (no changes)
Processing  2/3: [ongoing: test newfile.txt]
+ test "-f" "newfile.txt" (CWD=${BASEDIR}/OPAM/working-dir/.opam-switch/build/ongoing.dev)
[ERROR] The compilation of ongoing.dev failed at "test -f newfile.txt".




<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build ongoing dev
+- 
- No changes have been performed
'${OPAM} install ongoing -v' failed.
# Return code 31 #
### opam install ongoing --working-dir -v | sed-cmd test | sed-cmd cat

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
Processing  1/1: [ongoing.dev: git]
[ongoing.dev] synchronised (git+file://${BASEDIR}/ongoing#master)

The following actions will be performed:
=== install 1 package
  - install ongoing dev (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Processing  1/2: [ongoing: test newfile.txt]
+ test "-f" "newfile.txt" (CWD=${BASEDIR}/OPAM/working-dir/.opam-switch/build/ongoing.dev)
Processing  1/2: [ongoing: cat newfile.txt]
+ cat "newfile.txt" (CWD=${BASEDIR}/OPAM/working-dir/.opam-switch/build/ongoing.dev)
- new!
-> compiled  ongoing.dev
-> installed ongoing.dev
Done.
### : working dir and not pinned packages
### <pkg:qux.4>
opam-version:"2.0"
build:[ "test" "-f" "present"]
### <mkurl.sh>
basedir=`echo $BASEDIR | sed "s/\\\\\\\\/\\\\\\\\\\\\\\\\/g"`
echo "url { src:\"file://${basedir}/qux\" }" >> REPO/packages/qux/qux.4/opam
### sh mkurl.sh
### opam update default

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[default] synchronised from file://${BASEDIR}/REPO
Now run 'opam upgrade' to apply any package updates.
### <qux/present>
true
### <pin:ongoing/ongoing.opam>
opam-version: "2.0"
build: [[ "test" "-f" "ongoing.txt" ] [ "cat" "ongoing.txt" ]]
### git -C ./ongoing add ongoing.opam
### git -C ./ongoing commit -qm "mixed wd"
### <pin:ongoing/ongoing.opam>
opam-version: "2.0"
build: [[ "test" "-f" "newfile.txt" ] [ "cat" "newfile.txt" ]]
### opam install qux
The following actions will be performed:
=== install 1 package
  - install qux 4

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved qux.4  (file://${BASEDIR}/qux)
-> installed qux.4
Done.
### opam remove qux
The following actions will be performed:
=== remove 1 package
  - remove qux 4

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   qux.4
Done.
### opam install qux --working-dir
The following actions will be performed:
=== install 1 package
  - install qux 4
[NOTE] --working-dir is given but no requested package is pinned

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved qux.4  (file://${BASEDIR}/qux)
-> installed qux.4
Done.
### opam remove qux ongoing
The following actions will be performed:
=== remove 2 packages
  - remove ongoing dev (pinned)
  - remove qux     4

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   ongoing.dev
-> removed   qux.4
Done.
### <pin:ongoing/ongoing.opam>
opam-version: "2.0"
### git -C ./ongoing add ongoing.opam
### git -C ./ongoing commit -qm "mixed wd"
### <pin:ongoing/ongoing.opam>
opam-version: "2.0"
build: [[ "test" "-f" "newfile.txt" ] [ "cat" "newfile.txt" ]]
### opam install qux ongoing --working-dir -v | '^Processing .+$' -> '\c' | sed-cmd test | sed-cmd cat | grep -v "switch import" | unordered

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[ongoing.dev] synchronised (git+file://${BASEDIR}/ongoing#master)

The following actions will be performed:
=== install 2 packages
  - install ongoing dev (pinned)
  - install qux     4

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+ test "-f" "newfile.txt" (CWD=${BASEDIR}/OPAM/working-dir/.opam-switch/build/ongoing.dev)
+ cat "newfile.txt" (CWD=${BASEDIR}/OPAM/working-dir/.opam-switch/build/ongoing.dev)
+ test "-f" "present" (CWD=${BASEDIR}/OPAM/working-dir/.opam-switch/build/qux.4)
-> retrieved qux.4  (file://${BASEDIR}/qux)
- new!
-> compiled  ongoing.dev
-> installed ongoing.dev
-> compiled  qux.4
-> installed qux.4
Done.
### : Shows that opam correctly handles updated constraints with --working-dir
### : See https://github.com/ocaml/opam/issues/5178
### opam pin remove ./ongoing
Ok, ongoing is no longer pinned to git+file://${BASEDIR}/ongoing#master (version dev)
The following actions will be performed:
=== remove 1 package
  - remove ongoing dev

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   ongoing.dev
Done.
### <pkg:qux.1>
opam-version:"2.0"
### <pin:ongoing/ongoing.opam>
opam-version: "2.0"
depends: ["qux"]
### opam install ./ongoing --working-dir
Package ongoing does not exist, create as a NEW package? [y/n] y
ongoing is now pinned to git+file://${BASEDIR}/ongoing#master (version dev)
[ongoing.dev] synchronised (git+file://${BASEDIR}/ongoing#master)
The following actions will be performed:
=== install 1 package
  - install ongoing dev (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed ongoing.dev
Done.
### <pin:ongoing/ongoing.opam>
opam-version: "2.0"
depends: ["qux" {= "1"}]
### opam install ./ongoing --working-dir --show-action
[NOTE] Package ongoing is already installed (current version is dev).
### opam reinstall ./ongoing --working-dir --show-action

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[ongoing.dev] synchronised (git+file://${BASEDIR}/ongoing#master)
[ongoing] Installing new package description from upstream git+file://${BASEDIR}/ongoing#master

The following actions would be performed:
=== downgrade 1 package
  - downgrade qux     4 to 1       [required by ongoing]
=== recompile 1 package
  - recompile ongoing dev (pinned)
