N0REP0
### <pkg:foo.1>
opam-version: "2.0"
### <pkg:foo.2>
opam-version: "2.0"
### <pkg:bar.1>
opam-version: "2.0"
### <pkg:bar.3>
opam-version: "2.0"
### <pkg:baz.1>
opam-version: "2.0"
### <pkg:qux.1>
opam-version: "2.0"
### <pin:tolock/tolock.opam>
opam-version: "2.0"
depends: [ "foo" "bar" ]
build: [ "test" "-f" "content" ]
### <tolock/content>
it's here
### OPAMYES=1
### : simple lock file :
### opam switch create locking --empty
### opam pin -n ./tolock --with-version 1
Package tolock does not exist, create as a NEW package? [y/n] y
tolock is now pinned to file://${BASEDIR}/tolock (version 1)
### opam lock tolock
[ERROR] Skipping tolock.1, dependencies are not satisfied in this switch, not installed packages are:
          - foo
          - bar

No lock file generated
### opam install foo.1
The following actions will be performed:
=== install 1 package
  - install foo 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed foo.1
Done.
### opam lock tolock
[ERROR] Skipping tolock.1, dependencies are not satisfied in this switch, not installed packages are:
          - bar

No lock file generated
### opam install bar.1
The following actions will be performed:
=== install 1 package
  - install bar 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed bar.1
Done.
### opam lock tolock
Generated lock files for:
  - tolock.1: ${BASEDIR}/tolock.opam.locked
### opam-cat tolock.opam.locked
authors: "the testing team"
bug-reports: "https://nobug"
build: ["test" "-f" "content"]
depends: ["bar" {= "1"} "foo" {= "1"}]
description: "Two words."
dev-repo: "hg+https://pkg@op.am"
homepage: "egapemoh"
license: "MIT"
maintainer: "maint@tain.er"
name: "tolock"
opam-version: "2.0"
synopsis: "A word"
version: "1"
### opam lock tolock --lock-suffix new
Generated lock files for:
  - tolock.1: ${BASEDIR}/tolock.opam.new
### opam show --just-file --normalise ./tolock.opam.new --field depends,depopts,conflicts
depends:   ["bar" {= "1"} "foo" {= "1"}]
depopts:
conflicts:
### <pin:tolock/tolock.opam>
opam-version: "2.0"
depends: [ "foo" "bar" ]
depopts: "baz"
build: [ "test" "-f" "content" ]
### opam update tolock

<><> Synchronising development packages <><><><><><><><><><><><><><><><><><><><>
[tolock.1] synchronised (file://${BASEDIR}/tolock)
[tolock] Installing new package description from upstream file://${BASEDIR}/tolock
Now run 'opam upgrade' to apply any package updates.
### opam lock tolock
Generated lock files for:
  - tolock.1: ${BASEDIR}/tolock.opam.locked
### opam show --just-file --normalise ./tolock.opam.locked --field depends,depopts,conflicts
depends:   ["bar" {= "1"} "foo" {= "1"}]
depopts:
conflicts: ["baz"]
### opam install baz.1
The following actions will be performed:
=== install 1 package
  - install baz 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed baz.1
Done.
### opam lock tolock
Generated lock files for:
  - tolock.1: ${BASEDIR}/tolock.opam.locked
### opam show --just-file --normalise ./tolock.opam.locked --field depends,depopts,conflicts
depends:   ["bar" {= "1"} "baz" {= "1"} "foo" {= "1"}]
depopts:
conflicts:
### : error or formulaes :
### ### ERROR ###
### <pin:tolock/tolock.opam>
opam-version: "2.0"
depends: [ "foo" ("bar" | "qux") ]
depopts: "baz"
build: [ "test" "-f" "content" ]
### opam lock tolock
[ERROR] Skipping tolock.1, dependencies are not satisfied in this switch, not installed packages are:
          - qux

No lock file generated
### opam show --just-file --normalise ./tolock.opam.locked --field depends,depopts,conflicts
depends:   ["bar" {= "1"} "baz" {= "1"} "foo" {= "1"}]
depopts:
conflicts:
### : lock file install from directory :
### mv tolock.opam.locked ./tolock/
### opam switch create locking2 --empty
### opam-cat tolock/tolock.opam.locked
authors: "the testing team"
bug-reports: "https://nobug"
build: ["test" "-f" "content"]
depends: ["bar" {= "1"} "baz" {= "1"} "foo" {= "1"}]
description: "Two words."
dev-repo: "hg+https://pkg@op.am"
homepage: "egapemoh"
license: "MIT"
maintainer: "maint@tain.er"
name: "tolock"
opam-version: "2.0"
synopsis: "A word"
version: "1"
### opam pin -n ./tolock --locked
Package tolock does not exist, create as a NEW package? [y/n] y
tolock is now pinned to file://${BASEDIR}/tolock (version 1)
### opam show --normalise tolock --field depends:,depopts:,conflicts:
depends:   ["bar" {= "1"} "baz" {= "1"} "foo" {= "1"}]
depopts:
conflicts:
### opam unpin -n tolock
Ok, tolock is no longer pinned to file://${BASEDIR}/tolock (version 1)
### opam install ./tolock --show
The following actions would be performed:
=== install 3 packages
  - install bar    3            [required by tolock]
  - install foo    2            [required by tolock]
  - install tolock dev (pinned)
### opam install ./tolock --locked --show
The following actions would be performed:
=== install 4 packages
  - install bar    1          [required by tolock]
  - install baz    1          [required by tolock]
  - install foo    1          [required by tolock]
  - install tolock 1 (pinned)
### : install with filename :
### opam install ./tolock/tolock.opam --show
The following actions would be performed:
=== install 3 packages
  - install bar    3            [required by tolock]
  - install foo    2            [required by tolock]
  - install tolock dev (pinned)
### opam install ./tolock/tolock.opam --locked --show
The following actions would be performed:
=== install 4 packages
  - install bar    1          [required by tolock]
  - install baz    1          [required by tolock]
  - install foo    1          [required by tolock]
  - install tolock 1 (pinned)
### opam install ./tolock/tolock.opam --locked
Package tolock does not exist, create as a NEW package? [y/n] y
tolock is now pinned to file://${BASEDIR}/tolock (version 1)
The following actions will be performed:
=== install 4 packages
  - install bar    1          [required by tolock]
  - install baz    1          [required by tolock]
  - install foo    1          [required by tolock]
  - install tolock 1 (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed bar.1
-> installed baz.1
-> installed foo.1
-> retrieved tolock.1  (file://${BASEDIR}/tolock)
-> installed tolock.1
Done.
### : subdirectories :
### opam remove tolock
The following actions will be performed:
=== remove 1 package
  - remove tolock 1 (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   tolock.1
Done.
### <pin:old1/opam/oldlock.opam>
opam-version: "2.0"
depends: "foo"
### opam pin -n old1
Package oldlock does not exist, create as a NEW package? [y/n] y
oldlock is now pinned to file://${BASEDIR}/old1 (version dev)
### opam lock oldlock
Generated lock files for:
  - oldlock.dev: ${BASEDIR}/oldlock.opam.locked
### opam show ./oldlock.opam.locked --just-file --normalise --field name,version,depends,depopts,conflicts
name:      "oldlock"
version:   "dev"
depends:   ["foo" {= "1"}]
depopts:
conflicts:
### mv oldlock.opam.locked old1/opam/oldlock.opam.locked
### opam install foo.2
The following actions will be performed:
=== upgrade 1 package
  - upgrade foo 1 to 2

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   foo.1
-> installed foo.2
Done.
### opam install --show --locked oldlock

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[oldlock.dev] synchronised (file://${BASEDIR}/old1)
[oldlock] Installing new package description from upstream file://${BASEDIR}/old1

The following actions would be performed:
=== downgrade 1 package
  - downgrade foo     2 to 1       [required by oldlock]
=== install 1 package
  - install   oldlock dev (pinned)
### opam install --locked oldlock

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[oldlock.dev] synchronised (no changes)

The following actions will be performed:
=== downgrade 1 package
  - downgrade foo     2 to 1       [required by oldlock]
=== install 1 package
  - install   oldlock dev (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   foo.2
-> installed foo.1
-> installed oldlock.dev
Done.
### opam remove oldlock
The following actions will be performed:
=== remove 1 package
  - remove oldlock dev (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   oldlock.dev
Done.
### <pin:old2/opam/granpa.opam/opam>
opam-version: "2.0"
depends: "foo"
### opam pin -n old2
Package granpa does not exist, create as a NEW package? [y/n] y
granpa is now pinned to file://${BASEDIR}/old2 (version opam)
### opam lock granpa
Generated lock files for:
  - granpa.opam: ${BASEDIR}/granpa.opam.locked
### opam show ./granpa.opam.locked --just-file --normalise --field name,version,depends,depopts,conflicts
name:      "granpa"
version:   "opam"
depends:   ["foo" {= "1"}]
depopts:
conflicts:
### mv granpa.opam.locked old2/opam/granpa.opam/opam.locked
### opam install foo.2
The following actions will be performed:
=== upgrade 1 package
  - upgrade foo 1 to 2

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   foo.1
-> installed foo.2
Done.
### opam install --show --locked granpa

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[granpa.opam] synchronised (file://${BASEDIR}/old2)
[granpa] Installing new package description from upstream file://${BASEDIR}/old2

The following actions would be performed:
=== downgrade 1 package
  - downgrade foo    2 to 1        [required by granpa]
=== install 1 package
  - install   granpa opam (pinned)
### opam install --locked granpa

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[granpa.opam] synchronised (no changes)

The following actions will be performed:
=== downgrade 1 package
  - downgrade foo    2 to 1        [required by granpa]
=== install 1 package
  - install   granpa opam (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   foo.2
-> installed foo.1
-> installed granpa.opam
Done.
### opam remove granpa
The following actions will be performed:
=== remove 1 package
  - remove granpa opam (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   granpa.opam
Done.
### <pin:old3/ancestor.opam/opam>
opam-version: "2.0"
depends: "foo"
### opam pin -n old3
Package ancestor does not exist, create as a NEW package? [y/n] y
ancestor is now pinned to file://${BASEDIR}/old3 (version opam)
### opam lock ancestor
Generated lock files for:
  - ancestor.opam: ${BASEDIR}/ancestor.opam.locked
### opam show ./ancestor.opam.locked --just-file --normalise --field name,version,depends,depopts,conflicts
name:      "ancestor"
version:   "opam"
depends:   ["foo" {= "1"}]
depopts:
conflicts:
### mv ancestor.opam.locked old3/ancestor.opam/opam.locked
### opam install foo.2
The following actions will be performed:
=== upgrade 1 package
  - upgrade foo 1 to 2

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   foo.1
-> installed foo.2
Done.
### opam install --show --locked ancestor

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[ancestor.opam] synchronised (file://${BASEDIR}/old3)
[ancestor] Installing new package description from upstream file://${BASEDIR}/old3

The following actions would be performed:
=== downgrade 1 package
  - downgrade foo      2 to 1        [required by ancestor]
=== install 1 package
  - install   ancestor opam (pinned)
### opam install --locked ancestor

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[ancestor.opam] synchronised (no changes)

The following actions will be performed:
=== downgrade 1 package
  - downgrade foo      2 to 1        [required by ancestor]
=== install 1 package
  - install   ancestor opam (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   foo.2
-> installed foo.1
-> installed ancestor.opam
Done.
### opam remove ancestor
The following actions will be performed:
=== remove 1 package
  - remove ancestor opam (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   ancestor.opam
Done.
### <pin:old/opam/opam>
opam-version: "2.0"
name: "silver"
depends: "foo"
### # ERROR double silver
### opam pin -n old
This will pin the following packages: silver, silver. Continue? [y/n] y
Package silver does not exist, create as a NEW package? [y/n] y
silver is now pinned to file://${BASEDIR}/old (version dev)
[NOTE] Package silver is already pinned to file://${BASEDIR}/old (version dev).
silver is now pinned to file://${BASEDIR}/old (version dev)
### opam lock silver
Generated lock files for:
  - silver.dev: ${BASEDIR}/silver.opam.locked
### opam show ./silver.opam.locked --just-file --normalise --field name,version,depends,depopts,conflicts
name:      "silver"
version:   "dev"
depends:   ["foo" {= "1"}]
depopts:
conflicts:
### mv silver.opam.locked old/opam/opam.locked
### opam install foo.2
The following actions will be performed:
=== upgrade 1 package
  - upgrade foo 1 to 2

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   foo.1
-> installed foo.2
Done.
### opam install --show --locked silver

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[silver.dev] synchronised (file://${BASEDIR}/old)
[silver] Installing new package description from upstream file://${BASEDIR}/old

The following actions would be performed:
=== downgrade 1 package
  - downgrade foo    2 to 1       [required by silver]
=== install 1 package
  - install   silver dev (pinned)
### opam install --locked silver

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[silver.dev] synchronised (no changes)

The following actions will be performed:
=== downgrade 1 package
  - downgrade foo    2 to 1       [required by silver]
=== install 1 package
  - install   silver dev (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   foo.2
-> installed foo.1
-> installed silver.dev
Done.
### opam remove silver
The following actions will be performed:
=== remove 1 package
  - remove silver dev (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   silver.dev
Done.
### : interdependant locks :
### <pkg:dep-foo.1>
opam-version: "2.0"
### <pkg:dep-baz.2>
opam-version: "2.0"
### <pkg:dep-quux.3>
opam-version: "2.0"
### <pkg:dep-corge.4>
opam-version: "2.0"
### opam switch create interdep --empty
### <pin:interlock/foo.opam>
version: "pinned"
depends: "dep-foo"
### <pin:interlock/bar.opam>
version: "pinned"
depends: "foo"
### <pin:interlock/baz.opam>
version: "pinned"
depends: [ "bar" "dep-baz" ]
### <pin:interlock/qux.opam>
version: "pinned"
### <pin:interlock/quux.opam>
version: "pinned"
depends: "dep-quux"
### <pin:interlock/corge.opam>
version: "pinned"
depends: [ "quux" "dep-corge" ]
### opam install ./interlock --deps-only
The following actions will be performed:
=== install 4 packages
  - install dep-baz   2 [required by baz]
  - install dep-corge 4 [required by corge]
  - install dep-foo   1 [required by foo]
  - install dep-quux  3 [required by quux]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed dep-baz.2
-> installed dep-corge.4
-> installed dep-foo.1
-> installed dep-quux.3
Done.
### opam remove dep-quux dep-corge
The following actions will be performed:
=== remove 2 packages
  - remove dep-corge 4
  - remove dep-quux  3

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   dep-corge.4
-> removed   dep-quux.3
Done.
### opam lock ./interlock
[ERROR] Skipping corge.pinned, dependencies are not satisfied in this switch, not installed packages are:
          - dep-corge

[ERROR] Skipping quux.pinned, dependencies are not satisfied in this switch, not installed packages are:
          - dep-quux

Generated lock files for:
  - qux.pinned: ${BASEDIR}/qux.opam.locked
  - foo.pinned: ${BASEDIR}/foo.opam.locked
  - baz.pinned: ${BASEDIR}/baz.opam.locked
  - bar.pinned: ${BASEDIR}/bar.opam.locked
### opam show --just-file  --normalise ./foo.opam.locked -f version,depends
version: "pinned"
depends: ["dep-foo" {= "1"}]
### opam show --just-file  --normalise ./bar.opam.locked -f version,depends
version: "pinned"
depends: ["dep-foo" {= "1"} "foo" {= "pinned"}]
### opam show --just-file  --normalise ./baz.opam.locked -f version,depends
version: "pinned"
depends: ["bar" {= "pinned"} "dep-baz" {= "2"} "dep-foo" {= "1"} "foo" {= "pinned"}]
### opam show --just-file  --normalise ./qux.opam.locked -f version,depends
version: "pinned"
depends:
### : pin scan :
### <pin:tolock-scan/tolock-scan.opam>
version: "default-version"
### <pin:tolock-scan/tolock-scan.opam.locked>
version: "locked-version"
### opam pin scan ./tolock-scan --locked | grep -v '# Name'
tolock-scan  locked-version  file://${BASEDIR}/tolock-scan  -
### : git pin with lock file :
### git -C tolock init -q --initial-branch=master
### git -C tolock config core.autocrlf false
### git -C tolock add content
### git -C tolock commit -qm "init"
### opam switch create locking3 --empty
### opam pin -n ./tolock --locked
Package tolock does not exist, create as a NEW package? [y/n] y
tolock is now pinned to git+file://${BASEDIR}/tolock#master (version 1)
### opam show --normalise tolock --field depends:,depopts:,conflicts:
depends:   ["bar" {= "1"} "baz" {= "1"} "foo" {= "1"}]
depopts:
conflicts:
### opam unpin -n tolock
Ok, tolock is no longer pinned to git+file://${BASEDIR}/tolock#master (version 1)
### opam install ./tolock --show
The following actions would be performed:
=== install 3 packages
  - install bar    3            [required by tolock]
  - install foo    2            [required by tolock]
  - install tolock dev (pinned)
### opam install ./tolock --locked --show
The following actions would be performed:
=== install 4 packages
  - install bar    1          [required by tolock]
  - install baz    1          [required by tolock]
  - install foo    1          [required by tolock]
  - install tolock 1 (pinned)
### opam pin ./tolock -n
Package tolock does not exist, create as a NEW package? [y/n] y
tolock is now pinned to git+file://${BASEDIR}/tolock#master (version dev)
### opam install ./tolock --show
The following actions would be performed:
=== install 3 packages
  - install bar    3            [required by tolock]
  - install foo    2            [required by tolock]
  - install tolock dev (pinned)
### opam install ./tolock --locked --show
The following actions would be performed:
=== install 4 packages
  - install bar    1          [required by tolock]
  - install baz    1          [required by tolock]
  - install foo    1          [required by tolock]
  - install tolock 1 (pinned)
### opam install ./tolock --locked
tolock is now pinned to git+file://${BASEDIR}/tolock#master (version 1)
[NOTE] Ignoring uncommitted changes in ${BASEDIR}/tolock (`--working-dir' not specified or specified with no argument).
[tolock.1] synchronised (no changes)
The following actions will be performed:
=== install 4 packages
  - install bar    1          [required by tolock]
  - install baz    1          [required by tolock]
  - install foo    1          [required by tolock]
  - install tolock 1 (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed bar.1
-> installed baz.1
-> installed foo.1
-> retrieved tolock.1  (no changes)
-> installed tolock.1
Done.
### : git pin with opam file committed :
### git -C tolock add tolock.opam
### git -C tolock commit -qm "opam file"
### opam switch create locking4 --empty
### opam pin -n ./tolock --locked
Package tolock does not exist, create as a NEW package? [y/n] y
tolock is now pinned to git+file://${BASEDIR}/tolock#master (version 1)
### opam show --normalise tolock --field depends:,depopts:,conflicts:
depends:   ["bar" {= "1"} "baz" {= "1"} "foo" {= "1"}]
depopts:
conflicts:
### opam unpin -n tolock
Ok, tolock is no longer pinned to git+file://${BASEDIR}/tolock#master (version 1)
### opam install ./tolock --show
The following actions would be performed:
=== install 3 packages
  - install bar    3            [required by tolock]
  - install foo    2            [required by tolock]
  - install tolock dev (pinned)
### opam install ./tolock --locked --show
The following actions would be performed:
=== install 4 packages
  - install bar    1          [required by tolock]
  - install baz    1          [required by tolock]
  - install foo    1          [required by tolock]
  - install tolock 1 (pinned)
### opam pin ./tolock -n
Package tolock does not exist, create as a NEW package? [y/n] y
tolock is now pinned to git+file://${BASEDIR}/tolock#master (version dev)
### opam install ./tolock --show
The following actions would be performed:
=== install 3 packages
  - install bar    3            [required by tolock]
  - install foo    2            [required by tolock]
  - install tolock dev (pinned)
### opam install ./tolock --locked --show
The following actions would be performed:
=== install 4 packages
  - install bar    1          [required by tolock]
  - install baz    1          [required by tolock]
  - install foo    1          [required by tolock]
  - install tolock 1 (pinned)
### opam install ./tolock --locked
tolock is now pinned to git+file://${BASEDIR}/tolock#master (version 1)
[NOTE] Ignoring uncommitted changes in ${BASEDIR}/tolock (`--working-dir' not specified or specified with no argument).
[tolock.1] synchronised (no changes)
The following actions will be performed:
=== install 4 packages
  - install bar    1          [required by tolock]
  - install baz    1          [required by tolock]
  - install foo    1          [required by tolock]
  - install tolock 1 (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed bar.1
-> installed baz.1
-> installed foo.1
-> retrieved tolock.1  (no changes)
-> installed tolock.1
Done.
### : git pin with lock file committed :
### git -C tolock add tolock.opam.locked
### git -C tolock commit -qm "lock"
### opam switch create locking5 --empty
### opam pin -n ./tolock --locked
Package tolock does not exist, create as a NEW package? [y/n] y
tolock is now pinned to git+file://${BASEDIR}/tolock#master (version 1)
### opam show --normalise tolock --field depends:,depopts:,conflicts:
depends:   ["bar" {= "1"} "baz" {= "1"} "foo" {= "1"}]
depopts:
conflicts:
### opam unpin -n tolock
Ok, tolock is no longer pinned to git+file://${BASEDIR}/tolock#master (version 1)
### opam install ./tolock --show
The following actions would be performed:
=== install 3 packages
  - install bar    3            [required by tolock]
  - install foo    2            [required by tolock]
  - install tolock dev (pinned)
### opam install ./tolock --locked --show
The following actions would be performed:
=== install 4 packages
  - install bar    1          [required by tolock]
  - install baz    1          [required by tolock]
  - install foo    1          [required by tolock]
  - install tolock 1 (pinned)
### opam pin ./tolock -n
Package tolock does not exist, create as a NEW package? [y/n] y
tolock is now pinned to git+file://${BASEDIR}/tolock#master (version dev)
### opam install ./tolock --show
The following actions would be performed:
=== install 3 packages
  - install bar    3            [required by tolock]
  - install foo    2            [required by tolock]
  - install tolock dev (pinned)
### opam install ./tolock --locked --show
The following actions would be performed:
=== install 4 packages
  - install bar    1          [required by tolock]
  - install baz    1          [required by tolock]
  - install foo    1          [required by tolock]
  - install tolock 1 (pinned)
### opam install ./tolock --locked
tolock is now pinned to git+file://${BASEDIR}/tolock#master (version 1)
[tolock.1] synchronised (no changes)
The following actions will be performed:
=== install 4 packages
  - install bar    1          [required by tolock]
  - install baz    1          [required by tolock]
  - install foo    1          [required by tolock]
  - install tolock 1 (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed bar.1
-> installed baz.1
-> installed foo.1
-> installed tolock.1
Done.
### : check no repin in case of double 'install .' - with locked :
### opam unpin tolock
Ok, tolock is no longer pinned to git+file://${BASEDIR}/tolock#master (version 1)
The following actions will be performed:
=== remove 1 package
  - remove tolock 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   tolock.1
Done.
### opam install ./tolock --locked
Package tolock does not exist, create as a NEW package? [y/n] y
tolock is now pinned to git+file://${BASEDIR}/tolock#master (version 1)
The following actions will be performed:
=== install 1 package
  - install tolock 1 (pinned)

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

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   tolock.1
Done.
### opam install ./tolock --locked
[tolock.1] synchronised (no changes)
The following actions will be performed:
=== install 1 package
  - install tolock 1 (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed tolock.1
Done.
### : upgrade with lock :
### opam switch remove locking
Switch locking and all its packages will be wiped. Are you sure? [y/n] y
### opam switch create locking --empty
### rm -rf tolock
### <pin:tolock/tolock.opam>
build: [ "false" ]
version: "1"
### <pin:tolock/tolock.opam.locked>
version: "l1"
### opam pin ./tolock --locked
Package tolock does not exist, create as a NEW package? [y/n] y
tolock is now pinned to file://${BASEDIR}/tolock (version l1)

The following actions will be performed:
=== install 1 package
  - install tolock l1 (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed tolock.l1
Done.
### <pin:tolock/tolock.opam.locked>
version: "l2"
### opam update tolock

<><> Synchronising development packages <><><><><><><><><><><><><><><><><><><><>
[tolock.l1] synchronised (file://${BASEDIR}/tolock)
[tolock] Conflicting update of the metadata from file://${BASEDIR}/tolock.
Override files in ${BASEDIR}/OPAM/locking/.opam-switch/overlay/tolock (there will be a backup)? [y/n] y
User metadata backed up in ${BASEDIR}/OPAM/backup/tolock.bak
Now run 'opam upgrade' to apply any package updates.
### opam show tolock --field=version,build --normalise
version l2
build
### opam upgrade tolock

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[tolock.l2] synchronised (no changes)

The following actions will be performed:
=== upgrade 1 package
  - upgrade tolock l1 to l2 (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved tolock.l2  (file://${BASEDIR}/tolock)
-> removed   tolock.l1
-> installed tolock.l2
Done.
### <pin:tolock/tolock.opam>
build: [ "false" ]
version: "3"
### <pin:tolock/tolock.opam.locked>
version: "l3"
build: [ "echo" "locked" ]
### opam update tolock

<><> Synchronising development packages <><><><><><><><><><><><><><><><><><><><>
[tolock.l2] synchronised (file://${BASEDIR}/tolock)
[tolock] Conflicting update of the metadata from file://${BASEDIR}/tolock.
Override files in ${BASEDIR}/OPAM/locking/.opam-switch/overlay/tolock (there will be a backup)? [y/n] y
User metadata backed up in ${BASEDIR}/OPAM/backup/tolock.bak
Now run 'opam upgrade' to apply any package updates.
### opam show tolock --field=version,build --normalise
version l3
build   ["echo" "locked"]
### opam upgrade
The following actions will be performed:
=== upgrade 1 package
  - upgrade tolock l2 to l3 (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved tolock.l3  (file://${BASEDIR}/tolock)
-> removed   tolock.l2
-> installed tolock.l3
Done.
### <pin:tolock/tolock.opam>
build: [ "false" ]
version: "4"
### <pin:tolock/tolock.opam.locked>
version: "l4"
### opam update tolock

<><> Synchronising development packages <><><><><><><><><><><><><><><><><><><><>
[tolock.l3] synchronised (file://${BASEDIR}/tolock)
[tolock] Conflicting update of the metadata from file://${BASEDIR}/tolock.
Override files in ${BASEDIR}/OPAM/locking/.opam-switch/overlay/tolock (there will be a backup)? [y/n] y
User metadata backed up in ${BASEDIR}/OPAM/backup/tolock.bak
Now run 'opam upgrade' to apply any package updates.
### opam show tolock --field=version,build --normalise
version l4
build
### opam upgrade
The following actions will be performed:
=== upgrade 1 package
  - upgrade tolock l3 to l4 (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved tolock.l4  (file://${BASEDIR}/tolock)
-> removed   tolock.l3
-> installed tolock.l4
Done.
### <pin:tolock/tolock.opam.locked>
version: "l5"
build: [ "sh" "install.sh" ]
### <tolock/install.sh>
echo "lib: [" > tolock.install
for i in `ls files`; do
  echo "\"files/$i\"" >> tolock.install
done
echo "]" >> tolock.install
### opam upgrade tolock

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[tolock.l4] synchronised (file://${BASEDIR}/tolock)
[tolock] Conflicting update of the metadata from file://${BASEDIR}/tolock.
Override files in ${BASEDIR}/OPAM/locking/.opam-switch/overlay/tolock (there will be a backup)? [y/n] y
User metadata backed up in ${BASEDIR}/OPAM/backup/tolock.bak

The following actions will be performed:
=== upgrade 1 package
  - upgrade tolock l4 to l5 (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved tolock.l5  (file://${BASEDIR}/tolock)
-> removed   tolock.l4
-> installed tolock.l5
Done.
### opam list --all --installed --columns=name,installed-files --normalise
# Packages matching: any & installed
# Name # Installed files
tolock
### <tolock/files/fichier>
content
### opam update

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[default] no changes from file://${BASEDIR}/REPO

<><> Synchronising development packages <><><><><><><><><><><><><><><><><><><><>
[tolock.l5] synchronised (file://${BASEDIR}/tolock)
Now run 'opam upgrade' to apply any package updates.
### opam upgrade
The following actions will be performed:
=== recompile 1 package
  - recompile tolock l5 (pinned) [upstream or system changes]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved tolock.l5  (no changes)
-> removed   tolock.l5
-> installed tolock.l5
Done.
### opam list --all --installed --columns=name,installed-files --normalise
# Packages matching: any & installed
# Name # Installed files
tolock ${BASEDIR}/OPAM/locking/lib/tolock ${BASEDIR}/OPAM/locking/lib/tolock/fichier
### <tolock/files/warka>
content
### opam update --dev

<><> Synchronising development packages <><><><><><><><><><><><><><><><><><><><>
[tolock.l5] synchronised (file://${BASEDIR}/tolock)
Now run 'opam upgrade' to apply any package updates.
### opam upgrade tolock

<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[tolock.l5] synchronised (no changes)

The following actions will be performed:
=== recompile 1 package
  - recompile tolock l5 (pinned)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved tolock.l5  (no changes)
-> removed   tolock.l5
-> installed tolock.l5
Done.
### opam list --all --installed --columns=name,installed-files --normalise
# Packages matching: any & installed
# Name # Installed files
tolock ${BASEDIR}/OPAM/locking/lib/tolock ${BASEDIR}/OPAM/locking/lib/tolock/fichier ${BASEDIR}/OPAM/locking/lib/tolock/warka
### : Goblint format preserved error :
### <goblint/goblint.opam>
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
synopsis: "Static analysis framework for C"
maintainer: [
  "Michael Schwarz <michael.schwarz93@gmail.com>"
  "Simmo Saan <simmo.saan@gmail.com>"
  "Ralf Vogler <ralf.vogler@gmail.com>"
]
authors: [
  "Vesal Vojdani"
  "Kalmer Apinis"
  "Ralf Vogler"
  "Michael Schwarz"
  "Julian Erhard"
  "Simmo Saan"
]
license: "MIT"
homepage: "https://goblint.in.tum.de"
doc: "https://goblint.readthedocs.io/en/latest/"
bug-reports: "https://github.com/goblint/analyzer/issues"
depends: [
  "ocaml" {>= "4.09"}
  "dune" {>= "2.9.1"}
  "goblint-cil" {>= "1.8.2"}
  "batteries" {>= "3.2.0"}
  "zarith" {>= "1.8"}
  "qcheck-core"
  "ppx_distr_guards" {>= "0.2"}
  "ppx_deriving"
  "ppx_deriving_yojson"
  "ocaml-monadic" {>= "0.5"}
  "ounit2" {with-test}
  "odoc" {with-doc}
  "dune-site"
  "sha" {>= "1.12"}
  "conf-gmp" {>= "3"}
  "conf-ruby" {with-test}
  "benchmark" {with-test}
]
depopts: ["apron" "z3"]
build: [
  ["dune" "subst"] {dev}
  [
    "dune"
    "build"
    "-p"
    name
    "-j"
    jobs
    "--promote-install-files=false"
    "@install"
    "@runtest" {with-test}
    "@doc" {with-doc}
  ]
  ["dune" "install" "-p" name "--create-install-files" name]
]
dev-repo: "git+https://github.com/goblint/analyzer.git"
# on `dune build` goblint.opam will be generated from goblint.opam.template and dune-project
# also remember to generate/adjust goblint.opam.locked!
pin-depends: [
  [ "goblint-cil.1.8.2" "git+https://github.com/goblint/cil.git#a3c91aa6e8f946fec9a9a13361b051a73b12a65c" ]
  # TODO: add back after release, only pinned for optimization (https://github.com/ocaml-ppx/ppx_deriving/pull/252)
  [ "ppx_deriving.5.2.1" "git+https://github.com/ocaml-ppx/ppx_deriving.git#0a89b619f94cbbfc3b0fb3255ab4fe5bc77d32d6" ]
  # quoter workaround reverted for release, so no pin needed
  # [ "ppx_deriving_yojson.3.6.1" "git+https://github.com/ocaml-ppx/ppx_deriving_yojson.git#e030f13a3450e9cf7d2c43fa04e709ef608486cd" ]
  # TODO: add back after release, only pinned for CI stability
  [ "apron.v0.9.13" "git+https://github.com/antoinemine/apron.git#c852ebcc89e5cf4a5a3318e7c13c73e1756abb11"]
]
### <goblint/goblint.opam.locked>
opam-version: "2.0"
synopsis: "Static analysis framework for C"
maintainer: [
  "Michael Schwarz <michael.schwarz93@gmail.com>"
  "Simmo Saan <simmo.saan@gmail.com>"
  "Ralf Vogler <ralf.vogler@gmail.com>"
]
authors: [
  "Vesal Vojdani"
  "Kalmer Apinis"
  "Ralf Vogler"
  "Michael Schwarz"
  "Julian Erhard"
  "Simmo Saan"
]
license: "MIT"
homepage: "https://goblint.in.tum.de"
doc: "https://goblint.readthedocs.io/en/latest/"
bug-reports: "https://github.com/goblint/analyzer/issues"
depends: [
  "apron" {= "v0.9.13"}
  "astring" {= "0.8.5" & with-doc}
  "base-bigarray" {= "base"}
  "base-bytes" {= "base"}
  "base-threads" {= "base"}
  "base-unix" {= "base"}
  "batteries" {= "3.3.0"}
  "benchmark" {= "1.6" & with-test}
  "biniou" {= "1.2.1"}
  "camlidl" {= "1.09"}
  "cmdliner" {= "1.0.4" & with-doc}
  "conf-gmp" {= "3"}
  "conf-mpfr" {= "2"}
  "conf-perl" {= "1"}
  "conf-ruby" {= "1.0.0" & with-test}
  "cppo" {= "1.6.7"}
  "dune" {= "2.9.1"}
  "dune-private-libs" {= "2.9.1"}
  "dune-site" {= "2.9.1"}
  "easy-format" {= "1.3.2"}
  "fpath" {= "0.7.3" & with-doc}
  "goblint-cil" {= "1.8.2"}
  "mlgmpidl" {= "1.2.13"}
  "num" {= "1.4"}
  "ocaml" {= "4.12.0"}
  "ocaml-base-compiler" {= "4.12.0"}
  "ocaml-compiler-libs" {= "v0.12.4"}
  "ocaml-config" {= "2"}
  "ocaml-monadic" {= "0.5"}
  "ocaml-options-vanilla" {= "1"}
  "ocamlbuild" {= "0.14.0"}
  "ocamlfind" {= "1.9.1"}
  "odoc" {= "1.5.2" & with-doc}
  "ounit2" {= "2.2.4" & with-test}
  "ppx_derivers" {= "1.2.1"}
  "ppx_deriving" {= "5.2.1"}
  "ppx_deriving_yojson" {= "3.6.1"}
  "ppx_distr_guards" {= "0.3"}
  "ppxlib" {= "0.23.0"}
  "qcheck-core" {= "0.17"}
  "re" {= "1.9.0" & with-doc}
  "result" {= "1.5"}
  "seq" {= "base" & with-doc}
  "sexplib0" {= "v0.14.0"}
  "sha" {= "1.15.1"}
  "stdlib-shims" {= "0.3.0"}
  "topkg" {= "1.0.3" & with-doc}
  "tyxml" {= "4.4.0" & with-doc}
  "uchar" {= "0.0.2" & with-doc}
  "uutf" {= "1.0.2" & with-doc}
  "yojson" {= "1.7.0"}
  "zarith" {= "1.12"}
]
build: [
  ["dune" "subst"] {dev}
  [
  "dune"
  "build"
  "-p"
  name
  "-j"
  jobs
  "--promote-install-files=false"
  "@install"
  "@runtest" {with-test}
  "@doc" {with-doc}
]
  ["dune" "install" "-p" name "--create-install-files" name]
]
dev-repo: "git+https://github.com/goblint/analyzer.git"
name: "goblint"
version: "dev"
pin-depends: [
  [
  "apron.v0.9.13"
  "git+https://github.com/antoinemine/apron.git#c852ebcc89e5cf4a5a3318e7c13c73e1756abb11"
]
  [
  "goblint-cil.1.8.2"
  "git+https://github.com/goblint/cil.git#a3c91aa6e8f946fec9a9a13361b051a73b12a65c"
]
  [
  "ppx_deriving.5.2.1"
  "git+https://github.com/ocaml-ppx/ppx_deriving.git#0a89b619f94cbbfc3b0fb3255ab4fe5bc77d32d6"
]
]
### opam switch create gob --empty
### OPAMYES=1
### OPAMLOCKED=locked
### opam pin add -n goblint.dev ./goblint
Package goblint does not exist, create as a NEW package? [y/n] y
[goblint.dev] synchronised (file://${BASEDIR}/goblint)
The following additional pinnings are required by goblint.dev:
  - apron.v0.9.13 at git+https://github.com/antoinemine/apron.git#c852ebcc89e5cf4a5a3318e7c13c73e1756abb11
  - goblint-cil.1.8.2 at git+https://github.com/goblint/cil.git#a3c91aa6e8f946fec9a9a13361b051a73b12a65c
  - ppx_deriving.5.2.1 at git+https://github.com/ocaml-ppx/ppx_deriving.git#0a89b619f94cbbfc3b0fb3255ab4fe5bc77d32d6
Pin and install them? [y/n] y
Package apron does not exist, create as a NEW package? [y/n] y
[apron.v0.9.13] synchronised (no changes)
[WARNING] Failed checks on apron package definition from source at git+https://github.com/antoinemine/apron.git#c852ebcc89e5cf4a5a3318e7c13c73e1756abb11:
           warning 62: License doesn't adhere to the SPDX standard, see https://spdx.org/licenses/ : "LGPL-2.1 with linking exception"
apron is now pinned to git+https://github.com/antoinemine/apron.git#c852ebcc89e5cf4a5a3318e7c13c73e1756abb11 (version v0.9.13)
Package goblint-cil does not exist, create as a NEW package? [y/n] y
[goblint-cil.1.8.2] synchronised (no changes)
goblint-cil is now pinned to git+https://github.com/goblint/cil.git#a3c91aa6e8f946fec9a9a13361b051a73b12a65c (version 1.8.2)
Package ppx_deriving does not exist, create as a NEW package? [y/n] y
[ppx_deriving.5.2.1] synchronised (no changes)
ppx_deriving is now pinned to git+https://github.com/ocaml-ppx/ppx_deriving.git#0a89b619f94cbbfc3b0fb3255ab4fe5bc77d32d6 (version 5.2.1)
goblint is now pinned to file://${BASEDIR}/goblint (version dev)
### # removing src field is needed because of formatting, in macos/windows it is printed on 2 lines
### cat OPAM/gob/.opam-switch/overlay/goblint/opam | grep -v 'src:' | grep -v '/goblint"'
opam-version: "2.0"
synopsis: "Static analysis framework for C"
maintainer: [
  "Michael Schwarz <michael.schwarz93@gmail.com>"
  "Simmo Saan <simmo.saan@gmail.com>"
  "Ralf Vogler <ralf.vogler@gmail.com>"
]
authors: [
  "Vesal Vojdani"
  "Kalmer Apinis"
  "Ralf Vogler"
  "Michael Schwarz"
  "Julian Erhard"
  "Simmo Saan"
]
license: "MIT"
homepage: "https://goblint.in.tum.de"
doc: "https://goblint.readthedocs.io/en/latest/"
bug-reports: "https://github.com/goblint/analyzer/issues"
depends: [
  "apron" {= "v0.9.13"}
  "astring" {= "0.8.5" & with-doc}
  "base-bigarray" {= "base"}
  "base-bytes" {= "base"}
  "base-threads" {= "base"}
  "base-unix" {= "base"}
  "batteries" {= "3.3.0"}
  "benchmark" {= "1.6" & with-test}
  "biniou" {= "1.2.1"}
  "camlidl" {= "1.09"}
  "cmdliner" {= "1.0.4" & with-doc}
  "conf-gmp" {= "3"}
  "conf-mpfr" {= "2"}
  "conf-perl" {= "1"}
  "conf-ruby" {= "1.0.0" & with-test}
  "cppo" {= "1.6.7"}
  "dune" {= "2.9.1"}
  "dune-private-libs" {= "2.9.1"}
  "dune-site" {= "2.9.1"}
  "easy-format" {= "1.3.2"}
  "fpath" {= "0.7.3" & with-doc}
  "goblint-cil" {= "1.8.2"}
  "mlgmpidl" {= "1.2.13"}
  "num" {= "1.4"}
  "ocaml" {= "4.12.0"}
  "ocaml-base-compiler" {= "4.12.0"}
  "ocaml-compiler-libs" {= "v0.12.4"}
  "ocaml-config" {= "2"}
  "ocaml-monadic" {= "0.5"}
  "ocaml-options-vanilla" {= "1"}
  "ocamlbuild" {= "0.14.0"}
  "ocamlfind" {= "1.9.1"}
  "odoc" {= "1.5.2" & with-doc}
  "ounit2" {= "2.2.4" & with-test}
  "ppx_derivers" {= "1.2.1"}
  "ppx_deriving" {= "5.2.1"}
  "ppx_deriving_yojson" {= "3.6.1"}
  "ppx_distr_guards" {= "0.3"}
  "ppxlib" {= "0.23.0"}
  "qcheck-core" {= "0.17"}
  "re" {= "1.9.0" & with-doc}
  "result" {= "1.5"}
  "seq" {= "base" & with-doc}
  "sexplib0" {= "v0.14.0"}
  "sha" {= "1.15.1"}
  "stdlib-shims" {= "0.3.0"}
  "topkg" {= "1.0.3" & with-doc}
  "tyxml" {= "4.4.0" & with-doc}
  "uchar" {= "0.0.2" & with-doc}
  "uutf" {= "1.0.2" & with-doc}
  "yojson" {= "1.7.0"}
  "zarith" {= "1.12"}
]
build: [
  ["dune" "subst"] {dev}
  [
  "dune"
  "build"
  "-p"
  name
  "-j"
  jobs
  "--promote-install-files=false"
  "@install"
  "@runtest" {with-test}
  "@doc" {with-doc}
]
  ["dune" "install" "-p" name "--create-install-files" name]
]
dev-repo: "git+https://github.com/goblint/analyzer.git"
name: "goblint"
version: "dev"
pin-depends: [
  [
  "apron.v0.9.13"
  "git+https://github.com/antoinemine/apron.git#c852ebcc89e5cf4a5a3318e7c13c73e1756abb11"
]
  [
  "goblint-cil.1.8.2"
  "git+https://github.com/goblint/cil.git#a3c91aa6e8f946fec9a9a13361b051a73b12a65c"
]
  [
  "ppx_deriving.5.2.1"
  "git+https://github.com/ocaml-ppx/ppx_deriving.git#0a89b619f94cbbfc3b0fb3255ab4fe5bc77d32d6"
]
]
available: opam-version >= "2.1"
url {
}
x-locked: "locked"
