N0REP0
### <REPO/packages/foo/foo.1/opam>
opam-version: "2.0"
build: ["test" "-f" "bar"]
### <REPO/packages/foo/foo.1/files/bar>
some content
### : Internal repository storage as archive or plain directory :
### opam switch create tarring --empty
### opam update -vv | grep '^\+' | sed-cmd diff | sed-cmd patch | 'patch-[^"]+' -> 'patch'
+ diff "-ruaN" "default" "default.new" (CWD=${BASEDIR}/OPAM/repo)
+ patch "--version"
+ patch "-p1" "-i" "${BASEDIR}/OPAM/log/patch" (CWD=${BASEDIR}/OPAM/repo/default)
### ls $OPAMROOT/repo | grep -v "cache"
default
lock
repos-config
### opam install foo.1 -vv | grep '^\+' | sed-cmd test
+ test "-f" "bar" (CWD=${BASEDIR}/OPAM/tarring/.opam-switch/build/foo.1)
### opam repository add plain ./REPO --this-switch
[plain] Initialised
### OPAMREPOSITORYTARRING=1
### : From plain repo to tarred repo (default)
### <REPO/packages/foo/foo.2/opam>
opam-version: "2.0"
build: ["test" "-f" "baz"]
### <REPO/packages/foo/foo.2/files/baz>
some content
### opam update default -vv | grep '^\+' | sed-cmd tar | sed-cmd diff | sed-cmd patch | 'patch-[^"]+' -> 'patch'
+ diff "-ruaN" "default" "default.new" (CWD=${BASEDIR}/OPAM/repo)
+ patch "--version"
+ patch "-p1" "-i" "${BASEDIR}/OPAM/log/patch" (CWD=${BASEDIR}/OPAM/repo/default)
+ tar "cfz" "${BASEDIR}/OPAM/repo/default.tar.gz.tmp" "-C" "${BASEDIR}/OPAM/repo" "default"
### ls $OPAMROOT/repo | grep -v "cache"
default.tar.gz
lock
plain
repos-config
### opam install foo.2 -vv | grep '^\+' | sed-cmd test | sed-cmd tar
+ tar "xfz" "${BASEDIR}/OPAM/repo/default.tar.gz" "-C" "${OPAMTMP}"
+ test "-f" "baz" (CWD=${BASEDIR}/OPAM/tarring/.opam-switch/build/foo.2)
### opam repository remove default --all
### : Add tarred repo (tarred)
### <REPO/packages/foo/foo.3/opam>
opam-version: "2.0"
build: ["test" "-f" "baz"]
### <REPO/packages/foo/foo.3/files/baz>
some content
### opam repository add tarred ./REPO --this-switch
[tarred] Initialised
### : New tarred repositories does not change already unchanged existing ones
### ls $OPAMROOT/repo | grep -v "cache"
lock
plain
repos-config
tarred.tar.gz
### opam install foo.3 -vv | grep '^\+' | sed-cmd test | sed-cmd tar
+ tar "xfz" "${BASEDIR}/OPAM/repo/tarred.tar.gz" "-C" "${OPAMTMP}"
+ test "-f" "baz" (CWD=${BASEDIR}/OPAM/tarring/.opam-switch/build/foo.3)
### opam repository remove plain --all
### : Update tarred repo (tarred)
### <REPO/packages/foo/foo.4/opam>
opam-version: "2.0"
build: ["test" "-f" "baz"]
### <REPO/packages/foo/foo.4/files/baz>
some content
### opam update -vv | grep '^\+' | sed-cmd tar | sed-cmd diff | sed-cmd patch | 'patch-[^"]+' -> 'patch'
+ tar "xfz" "${BASEDIR}/OPAM/repo/tarred.tar.gz" "-C" "${OPAMTMP}"
+ diff "-ruaN" "tarred" "tarred.new" (CWD=${OPAMTMP})
+ patch "--version"
+ patch "-p1" "-i" "${BASEDIR}/OPAM/log/patch" (CWD=${OPAMTMP}/tarred)
+ tar "cfz" "${BASEDIR}/OPAM/repo/tarred.tar.gz.tmp" "-C" "${OPAMTMP}" "tarred"
### opam install foo.4 -vv | grep '^\+' | sed-cmd test | sed-cmd tar
+ tar "xfz" "${BASEDIR}/OPAM/repo/tarred.tar.gz" "-C" "${OPAMTMP}"
+ test "-f" "baz" (CWD=${BASEDIR}/OPAM/tarring/.opam-switch/build/foo.4)
### mkdir tarred-ext
### tar xf OPAM/repo/tarred.tar.gz
### diff -ru ./tarred REPO
### ls $OPAMROOT/repo | grep -v "cache"
lock
repos-config
tarred.tar.gz
### : From tarred repo to plain repo (tarred)
### OPAMREPOSITORYTARRING=0
### <REPO/packages/foo/foo.5/opam>
opam-version: "2.0"
build: ["test" "-f" "quux"]
### <REPO/packages/foo/foo.5/files/quux>
some content
### opam update -vv | grep '^\+' | sed-cmd tar | sed-cmd diff | sed-cmd patch | 'patch-[^"]+' -> 'patch'
+ tar "xfz" "${BASEDIR}/OPAM/repo/tarred.tar.gz" "-C" "${OPAMTMP}"
+ diff "-ruaN" "tarred" "tarred.new" (CWD=${OPAMTMP})
+ patch "--version"
+ patch "-p1" "-i" "${BASEDIR}/OPAM/log/patch" (CWD=${OPAMTMP}/tarred)
### opam install foo.5 -vv | grep '^\+' | sed-cmd test
+ test "-f" "quux" (CWD=${BASEDIR}/OPAM/tarring/.opam-switch/build/foo.5)
### ls $OPAMROOT/repo | grep -v "cache"
lock
repos-config
tarred
### ls $OPAMROOT/repo/tarred
packages
repo
### diff -ru ./REPO $OPAMROOT/repo/tarred
### # Noop update with no changes
### <REPO/packages/foo/foo.4/opam>
opam-version: "2.0"
build: ["test" "-f" "rab"]
### <REPO/packages/foo/foo.4/files/rab>
some content
### OPAMDEBUGSECTIONS="FILE(opam) FILE(repo) FILE(repos-config)  CACHE(repository)"
### opam update --debug-level=-3 | "state-[0-9A-Z]{8}" -> "state-hash" | unordered
FILE(config)                    Read ${BASEDIR}/OPAM/config in 0.000s
FILE(repos-config)              Read ${BASEDIR}/OPAM/repo/repos-config in 0.000s
CACHE(repository)               Loaded ${BASEDIR}/OPAM/repo/state-hash.cache in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/tarring/.opam-switch/packages/foo.5/opam in 0.000s

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[tarred] synchronised from file://${BASEDIR}/REPO
FILE(repo)                      Read ${BASEDIR}/OPAM/repo/tarred/repo in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/tarred/packages/foo/foo.4/opam in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/tarred/packages/foo/foo.3/opam in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/tarred/packages/foo/foo.2/opam in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/tarred/packages/foo/foo.1/opam in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/tarred/packages/foo/foo.5/opam in 0.000s
FILE(repos-config)              Wrote ${BASEDIR}/OPAM/repo/repos-config in 0.000s
CACHE(repository)               Writing the repository cache to ${BASEDIR}/OPAM/repo/state-hash.cache ...
CACHE(repository)               ${BASEDIR}/OPAM/repo/state-hash.cache written in 0.000s
Now run 'opam upgrade' to apply any package updates.
### opam install foo.4
The following actions will be performed:
=== downgrade 1 package
  - downgrade foo 5 to 4

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   foo.5
-> installed foo.4
Done.
### opam update --debug-level=-3 | "state-[0-9A-Z]{8}" -> "state-hash"
FILE(config)                    Read ${BASEDIR}/OPAM/config in 0.000s
FILE(repos-config)              Read ${BASEDIR}/OPAM/repo/repos-config in 0.000s
CACHE(repository)               Loaded ${BASEDIR}/OPAM/repo/state-hash.cache in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/tarring/.opam-switch/packages/foo.4/opam in 0.000s

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[tarred] no changes from file://${BASEDIR}/REPO
### opam list --all --all-versions
# Packages matching: any
# Package # Installed # Synopsis
foo.1     4
foo.2     4
foo.3     4
foo.4     4
foo.5     4
### opam install foo.1
The following actions will be performed:
=== downgrade 1 package
  - downgrade foo 4 to 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   foo.4
-> installed foo.1
Done.
### : behaviour with multi repo / on cache write
### <REPO2/repo>
opam-version: "2.0"
### <REPO2/packages/bar/bar.1/opam>
opam-version: "2.0"
build: ["test" "-f" "oof"]
### <REPO2/packages/bar/bar.1/files/oof>
some content
### opam repository add repo2 ./REPO2 --this-switch
[repo2] Initialised
### opam update --debug-level=-3 | "state-[0-9A-Z]{8}" -> "state-hash"
FILE(config)                    Read ${BASEDIR}/OPAM/config in 0.000s
FILE(repos-config)              Read ${BASEDIR}/OPAM/repo/repos-config in 0.000s
CACHE(repository)               Loaded ${BASEDIR}/OPAM/repo/state-hash.cache in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/tarring/.opam-switch/packages/foo.1/opam in 0.000s

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[repo2] no changes from file://${BASEDIR}/REPO2
[tarred] no changes from file://${BASEDIR}/REPO
### opam install bar.1
The following actions will be performed:
=== install 1 package
  - install bar 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed bar.1
Done.
### <REPO2/packages/bar/bar.2/opam>
opam-version: "2.0"
build: ["test" "-f" "oof"]
### <REPO2/packages/bar/bar.2/files/oof>
some content
### opam update --debug-level=-3 | "state-[0-9A-Z]{8}" -> "state-hash" | unordered
FILE(config)                    Read ${BASEDIR}/OPAM/config in 0.000s
FILE(repos-config)              Read ${BASEDIR}/OPAM/repo/repos-config in 0.000s
CACHE(repository)               Loaded ${BASEDIR}/OPAM/repo/state-hash.cache in 0.000s

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[repo2] synchronised from file://${BASEDIR}/REPO2
FILE(repo)                      Read ${BASEDIR}/OPAM/repo/repo2/repo in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/repo2/packages/bar/bar.2/opam in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/repo2/packages/bar/bar.1/opam in 0.000s
[tarred] no changes from file://${BASEDIR}/REPO
FILE(repos-config)              Wrote ${BASEDIR}/OPAM/repo/repos-config in 0.000s
CACHE(repository)               Writing the repository cache to ${BASEDIR}/OPAM/repo/state-hash.cache ...
CACHE(repository)               ${BASEDIR}/OPAM/repo/state-hash.cache written in 0.000s
Now run 'opam upgrade' to apply any package updates.
### opam install bar.2
The following actions will be performed:
=== upgrade 1 package
  - upgrade bar 1 to 2

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   bar.1
-> installed bar.2
Done.
### <REPO/packages/foo/foo.6/opam>
opam-version: "2.0"
build: ["test" "-f" "rab"]
### <REPO/packages/foo/foo.6/files/rab>
some content
### <REPO2/packages/bar/bar.3/opam>
opam-version: "2.0"
build: ["test" "-f" "oof"]
### <REPO2/packages/bar/bar.3/files/oof>
some content
### opam update --debug-level=-3 | "state-[0-9A-Z]{8}" -> "state-hash" | unordered
FILE(config)                    Read ${BASEDIR}/OPAM/config in 0.000s
FILE(repos-config)              Read ${BASEDIR}/OPAM/repo/repos-config in 0.000s
CACHE(repository)               Loaded ${BASEDIR}/OPAM/repo/state-hash.cache in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/tarring/.opam-switch/packages/bar.2/opam in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/tarring/.opam-switch/packages/foo.1/opam in 0.000s

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[repo2] synchronised from file://${BASEDIR}/REPO2
FILE(repo)                      Read ${BASEDIR}/OPAM/repo/repo2/repo in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/repo2/packages/bar/bar.2/opam in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/repo2/packages/bar/bar.3/opam in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/repo2/packages/bar/bar.1/opam in 0.000s
[tarred] synchronised from file://${BASEDIR}/REPO
FILE(repo)                      Read ${BASEDIR}/OPAM/repo/tarred/repo in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/tarred/packages/foo/foo.4/opam in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/tarred/packages/foo/foo.6/opam in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/tarred/packages/foo/foo.3/opam in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/tarred/packages/foo/foo.2/opam in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/tarred/packages/foo/foo.1/opam in 0.000s
FILE(opam)                      Read ${BASEDIR}/OPAM/repo/tarred/packages/foo/foo.5/opam in 0.000s
FILE(repos-config)              Wrote ${BASEDIR}/OPAM/repo/repos-config in 0.000s
CACHE(repository)               Writing the repository cache to ${BASEDIR}/OPAM/repo/state-hash.cache ...
CACHE(repository)               ${BASEDIR}/OPAM/repo/state-hash.cache written in 0.000s
Now run 'opam upgrade' to apply any package updates.
### opam install bar.3 foo.6 | unordered
The following actions will be performed:
=== upgrade 2 packages
  - upgrade bar 2 to 3
  - upgrade foo 1 to 6

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed   foo.1
-> installed foo.6
-> removed   bar.2
-> installed bar.3
Done.
### : Failing urls :
### <OPER/repo>
opam-version: "2.0"
### <OPER/packages/first/first.1/opam>
opam-version: "2.0"
### <OPER2/repo>
opam-version: "2.0"
### <OPER2/packages/second/second.2/opam>
opam-version: "2.0"
version: "2.2"
### <OPER3/repo>
opam-version: "2.0"
### <OPER3/packages/third/third.3/opam>
opam-version: "2.0"
### opam repository add oper ./OPER --all --set-default
[oper] Initialised
### opam repository remove tarred --all
### opam switch create repos --empty
### :: Reset repository at its state ::
### ::: rsync - rsync :::
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### <OPER/packages/fantom/fantom.0/opam>
opam-version: "2.0"
### opam repository set-url oper ./OPER4
[ERROR] Could not update repository "oper": rsync failed
[ERROR] Fetching repository oper with file://${BASEDIR}/OPER4 fails, reverting to file://${BASEDIR}/OPER
# Return code 40 #
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### ::: rsync - git :::
### opam repository set-url oper git+file://$BASEDIR/OPER4 | sed-cmd git
[ERROR] Could not update repository "oper": "git fetch -q" exited with code 128
[ERROR] Fetching repository oper with git+file://${BASEDIR}/OPER4 fails, reverting to file://${BASEDIR}/OPER
# Return code 40 #
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### opam repository set-url oper git+file://./OPER3#unknownbranch | sed-cmd git
[ERROR] Could not update repository "oper": "git fetch -q" exited with code 128
[ERROR] Fetching repository oper with git+file://./OPER3#unknownbranch fails, reverting to file://${BASEDIR}/OPER
# Return code 40 #
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### ::: git - rsync :::
### git -C ./OPER init -q
### git -C ./OPER config core.autocrlf false
### git -C ./OPER add repo
### git -C ./OPER add packages/first
### git -C ./OPER commit -qm "third"
### opam repository set-url oper git+file://$BASEDIR/OPER
[oper] Initialised
### git -C ./OPER add packages/fantom
### git -C ./OPER commit -qm "fantom"
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### opam repository set-url oper ./OPER4
[ERROR] Could not update repository "oper": rsync failed
[ERROR] Fetching repository oper with file://${BASEDIR}/OPER4 fails, reverting to git+file://${BASEDIR}/OPER
# Return code 40 #
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### ::: git - git :::
### opam repository set-url oper git+file://$BASEDIR/OPER4 | sed-cmd git
[ERROR] Could not update repository "oper": "git fetch -q" exited with code 128
[ERROR] Fetching repository oper with git+file://${BASEDIR}/OPER4 fails, reverting to git+file://${BASEDIR}/OPER
# Return code 40 #
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### opam repository set-url oper git+file://./OPER3#unknownbranch | sed-cmd git
[ERROR] Could not update repository "oper": "git fetch -q" exited with code 128
[ERROR] Fetching repository oper with git+file://./OPER3#unknownbranch fails, reverting to git+file://${BASEDIR}/OPER
# Return code 40 #
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### ::: check that fantom can be well fetched :::
### opam update oper

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[oper] synchronised from git+file://${BASEDIR}/OPER
Now run 'opam upgrade' to apply any package updates.
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
fantom --
first  --
### rm -rf OPER/.git OPER/packages/fantom
### opam repository set-url oper ./OPER
[oper] Initialised
### :: Simply failing urls ::
### opam repository --this-switch add oper4 ./OPER4
[ERROR] Could not update repository "oper4": rsync failed
[ERROR] Initial repository fetch failed
# Return code 40 #
### opam repository --this-switch

<><> Repository configuration for switch repos ><><><><><><><><><><><><><><><><>
 1 oper file://${BASEDIR}/OPER
### opam repository --this-switch set-url oper ./OPER4
[ERROR] Could not update repository "oper": rsync failed
[ERROR] Fetching repository oper with file://${BASEDIR}/OPER4 fails, reverting to file://${BASEDIR}/OPER
# Return code 40 #
### opam repository --this-switch

<><> Repository configuration for switch repos ><><><><><><><><><><><><><><><><>
 1 oper file://${BASEDIR}/OPER
### opam repository --this-switch add oper2 ./OPER2 --strict
[oper2] Initialised
[ERROR] In ${BASEDIR}/OPAM/repo/oper2/packages/second/second.2/opam:
        This file is for package 'second.2' but has mismatching fields 'version:2.2.
[ERROR] Strict mode: aborting
[ERROR] Could not update repository "oper2": OpamStd.OpamSys.Exit(30)
[ERROR] Initial repository fetch failed
# Return code 40 #
### opam repository --this-switch

<><> Repository configuration for switch repos ><><><><><><><><><><><><><><><><>
 1 oper file://${BASEDIR}/OPER
### opam repository --this-switch set-url oper ./OPER2 --strict
[oper] Initialised
[ERROR] In ${BASEDIR}/OPAM/repo/oper/packages/second/second.2/opam:
        This file is for package 'second.2' but has mismatching fields 'version:2.2.
[ERROR] Strict mode: aborting
[ERROR] Could not update repository "oper": OpamStd.OpamSys.Exit(30)
[ERROR] Fetching repository oper with file://${BASEDIR}/OPER2 fails, reverting to file://${BASEDIR}/OPER
# Return code 40 #
### opam repository --this-switch

<><> Repository configuration for switch repos ><><><><><><><><><><><><><><><><>
 1 oper file://${BASEDIR}/OPER
### opam repository --this-switch add oper3 ./OPER3 --strict
[oper3] Initialised
### opam repository --this-switch

<><> Repository configuration for switch repos ><><><><><><><><><><><><><><><><>
 1 oper3 file://${BASEDIR}/OPER3
 2 oper  file://${BASEDIR}/OPER
### opam repository --this-switch set-url oper ./OPER3 --strict
[oper] Initialised
### opam repository --this-switch

<><> Repository configuration for switch repos ><><><><><><><><><><><><><><><><>
 1 oper3 file://${BASEDIR}/OPER3
 2 oper  file://${BASEDIR}/OPER3
### :: Failing urls with repository tarring ::
### opam repository add default ./REPO --this-switch
[default] Initialised
### opam repository remove oper oper3 --all
### opam switch remove repos -y
Switch repos and all its packages will be wiped. Are you sure? [y/n] y
### OPAMREPOSITORYTARRING=1
### rm -rf OPER OPER2 OPER3
### <OPER/repo>
opam-version: "2.0"
### <OPER/packages/first/first.1/opam>
opam-version: "2.0"
### <OPER2/repo>
opam-version: "2.0"
### <OPER2/packages/second/second.2/opam>
opam-version: "2.0"
version: "2.2"
### <OPER3/repo>
opam-version: "2.0"
### <OPER3/packages/third/third.3/opam>
opam-version: "2.0"
### opam repository add oper ./OPER --all --set-default
[oper] Initialised
### opam repository remove default --all
### opam switch create repos --empty
### ::: Reset repository at its state :::
### :::: rsync - rsync ::::
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### <OPER/packages/fantom/fantom.0/opam>
opam-version: "2.0"
### opam repository set-url oper ./OPER4
[ERROR] Could not update repository "oper": rsync failed
[ERROR] Fetching repository oper with file://${BASEDIR}/OPER4 fails, reverting to file://${BASEDIR}/OPER
# Return code 40 #
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### :::: rsync - git ::::
### opam repository set-url oper git+file://$BASEDIR/OPER4 | sed-cmd git
[ERROR] Could not update repository "oper": "git fetch -q" exited with code 128
[ERROR] Fetching repository oper with git+file://${BASEDIR}/OPER4 fails, reverting to file://${BASEDIR}/OPER
# Return code 40 #
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### opam repository set-url oper git+file://./OPER3#unknownbranch | sed-cmd git
[ERROR] Could not update repository "oper": "git fetch -q" exited with code 128
[ERROR] Fetching repository oper with git+file://./OPER3#unknownbranch fails, reverting to file://${BASEDIR}/OPER
# Return code 40 #
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### :::: git - rsync ::::
### git -C ./OPER init -q
### git -C ./OPER config core.autocrlf false
### git -C ./OPER add repo
### git -C ./OPER add packages/first
### git -C ./OPER commit -qm "third"
### opam repository set-url oper git+file://$BASEDIR/OPER
[oper] Initialised
### git -C ./OPER add packages/fantom
### git -C ./OPER commit -qm "fantom"
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### opam repository set-url oper ./OPER4
[ERROR] Could not update repository "oper": rsync failed
[ERROR] Fetching repository oper with file://${BASEDIR}/OPER4 fails, reverting to git+file://${BASEDIR}/OPER
# Return code 40 #
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### :::: git - git ::::
### opam repository set-url oper git+file://$BASEDIR/OPER4 | sed-cmd git
[ERROR] Could not update repository "oper": "git fetch -q" exited with code 128
[ERROR] Fetching repository oper with git+file://${BASEDIR}/OPER4 fails, reverting to git+file://${BASEDIR}/OPER
# Return code 40 #
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### opam repository set-url oper git+file://./OPER3#unknownbranch | sed-cmd git
[ERROR] Could not update repository "oper": "git fetch -q" exited with code 128
[ERROR] Fetching repository oper with git+file://./OPER3#unknownbranch fails, reverting to git+file://${BASEDIR}/OPER
# Return code 40 #
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
first  --
### ::: check that fantom can be well fetched :::
### opam update oper

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[oper] synchronised from git+file://${BASEDIR}/OPER
Now run 'opam upgrade' to apply any package updates.
### opam list --available --repo=oper
# Packages matching: from-repository(oper) & available
# Name # Installed # Synopsis
fantom --
first  --
### rm -rf OPER/.git OPER/packages/fantom
### opam repository set-url oper ./OPER
[oper] Initialised
### ::: Simply failing urls :::
### opam repository --this-switch add oper4 ./OPER4
[ERROR] Could not update repository "oper4": rsync failed
[ERROR] Initial repository fetch failed
# Return code 40 #
### opam repository --this-switch

<><> Repository configuration for switch repos ><><><><><><><><><><><><><><><><>
 1 oper file://${BASEDIR}/OPER
### opam repository --this-switch set-url oper ./OPER4
[ERROR] Could not update repository "oper": rsync failed
[ERROR] Fetching repository oper with file://${BASEDIR}/OPER4 fails, reverting to file://${BASEDIR}/OPER
# Return code 40 #
### opam repository --this-switch

<><> Repository configuration for switch repos ><><><><><><><><><><><><><><><><>
 1 oper file://${BASEDIR}/OPER
### opam repository --this-switch add oper2 ./OPER2 --strict
[oper2] Initialised
[ERROR] In ${BASEDIR}/OPAM/repo/oper2/packages/second/second.2/opam:
        This file is for package 'second.2' but has mismatching fields 'version:2.2.
[ERROR] Strict mode: aborting
[ERROR] Could not update repository "oper2": OpamStd.OpamSys.Exit(30)
[ERROR] Initial repository fetch failed
# Return code 40 #
### opam repository --this-switch

<><> Repository configuration for switch repos ><><><><><><><><><><><><><><><><>
 1 oper file://${BASEDIR}/OPER
### opam repository --this-switch set-url oper ./OPER2 --strict
[oper] Initialised
[ERROR] In ${BASEDIR}/OPAM/repo/oper/packages/second/second.2/opam:
        This file is for package 'second.2' but has mismatching fields 'version:2.2.
[ERROR] Strict mode: aborting
[ERROR] Could not update repository "oper": OpamStd.OpamSys.Exit(30)
[ERROR] Fetching repository oper with file://${BASEDIR}/OPER2 fails, reverting to file://${BASEDIR}/OPER
# Return code 40 #
### opam repository --this-switch

<><> Repository configuration for switch repos ><><><><><><><><><><><><><><><><>
 1 oper file://${BASEDIR}/OPER
### opam repository --this-switch add oper3 ./OPER3 --strict
[oper3] Initialised
### opam repository --this-switch

<><> Repository configuration for switch repos ><><><><><><><><><><><><><><><><>
 1 oper3 file://${BASEDIR}/OPER3
 2 oper  file://${BASEDIR}/OPER
### opam repository --this-switch set-url oper ./OPER3 --strict
[oper] Initialised
### opam repository --this-switch

<><> Repository configuration for switch repos ><><><><><><><><><><><><><><><><>
 1 oper3 file://${BASEDIR}/OPER3
 2 oper  file://${BASEDIR}/OPER3
### : Ensure that git repository is retrieved not with full history
### OPAMREPOSITORYTARRING=0
### <TMCS/repo>
opam-version: "2.0"
### <TMCS/packages/first/first.1/opam>
opam-version: "2.0"
### git -C ./TMCS init -q
### git -C ./TMCS config core.autocrlf false
### git -C ./TMCS add repo
### git -C ./TMCS add packages/first
### git -C ./TMCS commit -qm "init"
### git -C ./TMCS commit --allow-empty -m "second empty commit" --quiet
### git -C ./TMCS commit --allow-empty -m "thirs empty commit" --quiet
### git -C ./TMCS rev-list --all --count
3
### opam repository add to-many-commits git+file://$BASEDIR/TMCS --this-switch
[to-many-commits] Initialised
### git -C ./OPAM/repo/to-many-commits rev-list --all --count
1
