@@ -1247,39 +1247,60 @@ depends: [
1247
1247
"a-doc-dep" {with-doc}
1248
1248
]
1249
1249
build: [ "test" "-f" "content" ]
1250
+ ### <add-pindepends.sh>
1251
+ basedir=$(printf '%s' "$BASEDIR" | sed 's/\\/\\\\/g')
1252
+ cat >> tolock/tolock.opam << EOF
1250
1253
pin-depends: [
1251
- [ "a-simple-dep.dev" "git+https ://github.com/dbuenzli/cmdliner#f239981642a " ]
1252
- [ "a-test-dep.dev" "git+https ://github.com/dbuenzli/cmdliner#1de361182ab " ]
1253
- [ "a-doc-dep.dev" "git+https ://github.com/dbuenzli/cmdliner#e8f8890fe48 " ]
1254
+ [ "a-simple-dep.dev" "git+file ://$basedir/simple-dep " ]
1255
+ [ "a-test-dep.dev" "git+file ://$basedir/test-dep " ]
1256
+ [ "a-doc-dep.dev" "git+file ://$basedir/doc-dep " ]
1254
1257
]
1258
+ EOF
1259
+ ### sh add-pindepends.sh
1255
1260
### <tolock/content>
1256
1261
it's here
1257
- ### <pin:opam-file>
1262
+ ### : -- :
1263
+ ### mkdir simple-dep
1264
+ ### git -C simple-dep init -q --initial-branch=master
1265
+ ### git -C simple-dep config core.autocrlf false
1266
+ ### <pin:simple-dep/a-simple-dep.opam>
1258
1267
opam-version: "2.0"
1259
1268
version: "dev"
1260
- ### OPAMEDITOR="cp -f ${BASEDIR}/opam-file"
1269
+ ### git -C simple-dep add a-simple-dep.opam
1270
+ ### git -C simple-dep commit -qm "simple"
1271
+ ### mkdir doc-dep
1272
+ ### git -C doc-dep init -q --initial-branch=master
1273
+ ### git -C doc-dep config core.autocrlf false
1274
+ ### <pin:doc-dep/a-doc-dep.opam>
1275
+ opam-version: "2.0"
1276
+ version: "dev"
1277
+ ### git -C doc-dep add a-doc-dep.opam
1278
+ ### git -C doc-dep commit -qm "doc"
1279
+ ### mkdir test-dep
1280
+ ### git -C test-dep init -q --initial-branch=master
1281
+ ### git -C test-dep config core.autocrlf false
1282
+ ### <pin:test-dep/a-test-dep.opam>
1283
+ opam-version: "2.0"
1284
+ version: "dev"
1285
+ ### git -C test-dep add a-test-dep.opam
1286
+ ### git -C test-dep commit -qm "test"
1287
+ ### : -- :
1261
1288
### opam install ./tolock --with-test --with-doc
1262
1289
[NOTE] Package tolock does not exist in opam repositories registered in the current switch.
1263
1290
The following additional pinnings are required by tolock.dev:
1264
- - a-simple-dep.dev at git+https ://github.com/dbuenzli/cmdliner#f239981642a
1265
- - a-test-dep.dev at git+https ://github.com/dbuenzli/cmdliner#1de361182ab
1266
- - a-doc-dep.dev at git+https ://github.com/dbuenzli/cmdliner#e8f8890fe48
1291
+ - a-simple-dep.dev at git+file ://${BASEDIR}/simple-dep
1292
+ - a-test-dep.dev at git+file ://${BASEDIR}/test-dep
1293
+ - a-doc-dep.dev at git+file ://${BASEDIR}/doc-dep
1267
1294
Pin and install them? [Y/n] y
1268
1295
[NOTE] Package a-simple-dep does not exist in opam repositories registered in the current switch.
1269
1296
[a-simple-dep.dev] synchronised (no changes)
1270
- [NOTE] No package definition found for a-simple-dep.dev: please complete the template
1271
- You can edit this file again with "opam pin edit a-simple-dep", export it with "opam show a-simple-dep --raw"
1272
- a-simple-dep is now pinned to git+https://github.com/dbuenzli/cmdliner#f239981642a (version dev)
1297
+ a-simple-dep is now pinned to git+file://${BASEDIR}/simple-dep (version dev)
1273
1298
[NOTE] Package a-test-dep does not exist in opam repositories registered in the current switch.
1274
1299
[a-test-dep.dev] synchronised (no changes)
1275
- [NOTE] No package definition found for a-test-dep.dev: please complete the template
1276
- You can edit this file again with "opam pin edit a-test-dep", export it with "opam show a-test-dep --raw"
1277
- a-test-dep is now pinned to git+https://github.com/dbuenzli/cmdliner#1de361182ab (version dev)
1300
+ a-test-dep is now pinned to git+file://${BASEDIR}/test-dep (version dev)
1278
1301
[NOTE] Package a-doc-dep does not exist in opam repositories registered in the current switch.
1279
1302
[a-doc-dep.dev] synchronised (no changes)
1280
- [NOTE] No package definition found for a-doc-dep.dev: please complete the template
1281
- You can edit this file again with "opam pin edit a-doc-dep", export it with "opam show a-doc-dep --raw"
1282
- a-doc-dep is now pinned to git+https://github.com/dbuenzli/cmdliner#e8f8890fe48 (version dev)
1303
+ a-doc-dep is now pinned to git+file://${BASEDIR}/doc-dep (version dev)
1283
1304
tolock is now pinned to file://${BASEDIR}/tolock (version dev)
1284
1305
The following actions will be performed:
1285
1306
=== install 5 packages
@@ -1290,17 +1311,17 @@ The following actions will be performed:
1290
1311
- install tolock dev (pinned)
1291
1312
1292
1313
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
1293
- -> retrieved a-doc-dep.dev (no changes)
1294
1314
-> installed a-doc-dep.dev
1295
- -> retrieved a-simple-dep.dev (no changes)
1296
1315
-> installed a-simple-dep.dev
1297
- -> retrieved a-test-dep.dev (no changes)
1298
1316
-> installed a-test-dep.dev
1299
1317
-> installed foo.2
1300
1318
-> retrieved tolock.dev (file://${BASEDIR}/tolock)
1301
1319
-> installed tolock.dev
1302
1320
Done.
1303
- ### opam lock tolock
1321
+ ### opam lock tolock --keep-local
1322
+ [NOTE] Dependency a-doc-dep.dev is pinned to local target git+file://${BASEDIR}/doc-dep, keeping it.
1323
+ [NOTE] Dependency a-simple-dep.dev is pinned to local target git+file://${BASEDIR}/simple-dep, keeping it.
1324
+ [NOTE] Dependency a-test-dep.dev is pinned to local target git+file://${BASEDIR}/test-dep, keeping it.
1304
1325
Generated lock files for:
1305
1326
- tolock.dev: ${BASEDIR}/tolock.opam.locked
1306
1327
### opam-cat tolock.opam.locked
@@ -1315,7 +1336,7 @@ license: "MIT"
1315
1336
1316
1337
name: "tolock"
1317
1338
opam-version: "2.0"
1318
- pin-depends: [["a-doc-dep.dev" "git+https ://github.com/dbuenzli/cmdliner#e8f8890fe48 "] ["a-simple-dep.dev" "git+https ://github.com/dbuenzli/cmdliner#f239981642a "] ["a-test-dep.dev" "git+https ://github.com/dbuenzli/cmdliner#1de361182ab "]]
1339
+ pin-depends: [["a-doc-dep.dev" "git+file ://${BASEDIR}/doc-dep "] ["a-simple-dep.dev" "git+file ://${BASEDIR}/simple-dep "] ["a-test-dep.dev" "git+file ://${BASEDIR}/test-dep "]]
1319
1340
synopsis: "A word"
1320
1341
version: "dev"
1321
1342
### : Keep local pins as pin-depends
0 commit comments