-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5471 from rjbou/pin-depends-test
lock: fix pin-depends with `with-` variables
- Loading branch information
Showing
3 changed files
with
98 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1235,3 +1235,86 @@ available: opam-version >= "2.1" | |
url { | ||
} | ||
x-locked: "locked" | ||
### : Pin depends : | ||
### rm -r tolock | ||
### opam switch create pin-depends --empty | ||
### <pin:tolock/tolock.opam> | ||
opam-version: "2.0" | ||
depends: [ | ||
"foo" | ||
"a-simple-dep" | ||
"a-test-dep" {with-test} | ||
"a-doc-dep" {with-doc} | ||
] | ||
build: [ "test" "-f" "content" ] | ||
pin-depends: [ | ||
[ "a-simple-dep.dev" "git+https://github.com/dbuenzli/cmdliner#f239981642a" ] | ||
[ "a-test-dep.dev" "git+https://github.com/dbuenzli/cmdliner#1de361182ab" ] | ||
[ "a-doc-dep.dev" "git+https://github.com/dbuenzli/cmdliner#e8f8890fe48" ] | ||
] | ||
### <tolock/content> | ||
it's here | ||
### <pin:opam-file> | ||
opam-version: "2.0" | ||
version: "dev" | ||
### OPAMEDITOR="cp -f ${BASEDIR}/opam-file" | ||
### opam install ./tolock --with-test --with-doc | ||
[NOTE] Package tolock does not exist in opam repositories registered in the current switch. | ||
The following additional pinnings are required by tolock.dev: | ||
- a-simple-dep.dev at git+https://github.com/dbuenzli/cmdliner#f239981642a | ||
- a-test-dep.dev at git+https://github.com/dbuenzli/cmdliner#1de361182ab | ||
- a-doc-dep.dev at git+https://github.com/dbuenzli/cmdliner#e8f8890fe48 | ||
Pin and install them? [Y/n] y | ||
[NOTE] Package a-simple-dep does not exist in opam repositories registered in the current switch. | ||
[a-simple-dep.dev] synchronised (no changes) | ||
[NOTE] No package definition found for a-simple-dep.dev: please complete the template | ||
You can edit this file again with "opam pin edit a-simple-dep", export it with "opam show a-simple-dep --raw" | ||
a-simple-dep is now pinned to git+https://github.com/dbuenzli/cmdliner#f239981642a (version dev) | ||
[NOTE] Package a-test-dep does not exist in opam repositories registered in the current switch. | ||
[a-test-dep.dev] synchronised (no changes) | ||
[NOTE] No package definition found for a-test-dep.dev: please complete the template | ||
You can edit this file again with "opam pin edit a-test-dep", export it with "opam show a-test-dep --raw" | ||
a-test-dep is now pinned to git+https://github.com/dbuenzli/cmdliner#1de361182ab (version dev) | ||
[NOTE] Package a-doc-dep does not exist in opam repositories registered in the current switch. | ||
[a-doc-dep.dev] synchronised (no changes) | ||
[NOTE] No package definition found for a-doc-dep.dev: please complete the template | ||
You can edit this file again with "opam pin edit a-doc-dep", export it with "opam show a-doc-dep --raw" | ||
a-doc-dep is now pinned to git+https://github.com/dbuenzli/cmdliner#e8f8890fe48 (version dev) | ||
tolock is now pinned to file://${BASEDIR}/tolock (version dev) | ||
The following actions will be performed: | ||
=== install 5 packages | ||
- install a-doc-dep dev (pinned) [required by tolock] | ||
- install a-simple-dep dev (pinned) [required by tolock] | ||
- install a-test-dep dev (pinned) [required by tolock] | ||
- install foo 2 [required by tolock] | ||
- install tolock dev (pinned) | ||
|
||
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> | ||
-> retrieved a-doc-dep.dev (no changes) | ||
-> installed a-doc-dep.dev | ||
-> retrieved a-simple-dep.dev (no changes) | ||
-> installed a-simple-dep.dev | ||
-> retrieved a-test-dep.dev (no changes) | ||
-> installed a-test-dep.dev | ||
-> installed foo.2 | ||
-> retrieved tolock.dev (file://${BASEDIR}/tolock) | ||
-> installed tolock.dev | ||
Done. | ||
### opam lock tolock | ||
Generated lock files for: | ||
- tolock.dev: ${BASEDIR}/tolock.opam.locked | ||
### opam-cat tolock.opam.locked | ||
authors: "the testing team" | ||
bug-reports: "https://nobug" | ||
build: ["test" "-f" "content"] | ||
depends: ["a-doc-dep" {= "dev" & with-doc} "a-simple-dep" {= "dev"} "a-test-dep" {= "dev" & with-test} "foo" {= "2"}] | ||
description: "Two words." | ||
dev-repo: "hg+https://[email protected]" | ||
homepage: "egapemoh" | ||
license: "MIT" | ||
maintainer: "[email protected]" | ||
name: "tolock" | ||
opam-version: "2.0" | ||
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"]] | ||
synopsis: "A word" | ||
version: "dev" |