Skip to content

Commit 7659ee3

Browse files
committed
Fix #6374 once again
1 parent baff567 commit 7659ee3

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

src/client/opamAuxCommands.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,9 @@ let autopin st ?(simulate=false) ?quiet ?locked ?recurse ?subpath
546546
OpamUpdate.dev_packages st ~working_dir:OpamPackage.Set.empty already_pinned
547547
in
548548
let st =
549-
if OpamClientConfig.(!r.ignore_pin_depends) then st else
549+
(* NOTE: We skip pin-depends on non-simulated because handle_pin_depends has
550+
already been called in source_pin *)
551+
if not simulate || OpamClientConfig.(!r.ignore_pin_depends) then st else
550552
OpamPackage.Set.fold (fun nv st ->
551553
OpamPinCommand.handle_pin_depends st nv (OpamSwitchState.opam st nv))
552554
(OpamPackage.Set.union pins already_pinned_set) st

tests/reftests/autopin.test

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,6 @@ The following additional pinnings are required by local-with-pin-deps.dev:
401401
Pin and install them? [Y/n] n
402402
Try to install anyway, assuming `--ignore-pin-depends'? [Y/n] y
403403
local-with-pin-deps is now pinned to file://${BASEDIR}/local-with-pin-deps (version dev)
404-
The following additional pinnings are required by local-with-pin-deps.dev:
405-
- pin-dep.dev at file://${BASEDIR}/pin-dep
406-
Pin and install them? [Y/n] n
407-
Try to install anyway, assuming `--ignore-pin-depends'? [Y/n] y
408404

409405
<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
410406
Switch invariant: ["ocaml" {>= "4.05.0"}]

tests/reftests/pin-depends.test

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ The following additional pinnings are required by local-with-pin-deps.dev:
8282
Pin and install them? [Y/n] n
8383
Try to install anyway, assuming `--ignore-pin-depends'? [Y/n] y
8484
local-with-pin-deps is now pinned to file://${BASEDIR}/local-with-pin-deps (version dev)
85-
The following additional pinnings are required by local-with-pin-deps.dev:
86-
- pin-dep.dev at file://${BASEDIR}/pin-dep
87-
Pin and install them? [Y/n] n
88-
Try to install anyway, assuming `--ignore-pin-depends'? [Y/n] y
8985
[ERROR] Package conflict!
9086
* Missing dependency:
9187
- local-with-pin-deps -> pin-dep
@@ -193,10 +189,6 @@ The following additional pinnings are required by local-with-pin-deps.dev:
193189
Pin and install them? [Y/n] n
194190
Try to install anyway, assuming `--ignore-pin-depends'? [Y/n] y
195191
local-with-pin-deps is now pinned to file://${BASEDIR}/local-with-pin-deps (version dev)
196-
The following additional pinnings are required by local-with-pin-deps.dev:
197-
- pin-dep.dev at file://${BASEDIR}/pin-dep
198-
Pin and install them? [Y/n] n
199-
Try to install anyway, assuming `--ignore-pin-depends'? [Y/n] y
200192
The following actions will be performed:
201193
=== install 2 packages
202194
- install local-with-pin-deps dev (pinned)
@@ -276,10 +268,6 @@ The following additional pinnings are required by local-with-pin-deps.dev:
276268
Pin and install them? [Y/n] n
277269
Try to install anyway, assuming `--ignore-pin-depends'? [Y/n] y
278270
local-with-pin-deps is now pinned to file://${BASEDIR}/local-with-pin-deps (version dev)
279-
The following additional pinnings are required by local-with-pin-deps.dev:
280-
- pin-dep.dev at file://${BASEDIR}/pin-dep
281-
Pin and install them? [Y/n] n
282-
Try to install anyway, assuming `--ignore-pin-depends'? [Y/n] y
283271

284272
<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
285273
Switch invariant: []
@@ -388,10 +376,6 @@ The following additional pinnings are required by local-with-pin-deps.dev:
388376
Pin and install them? [Y/n] n
389377
Try to install anyway, assuming `--ignore-pin-depends'? [Y/n] y
390378
local-with-pin-deps is now pinned to file://${BASEDIR}/local-with-pin-deps (version dev)
391-
The following additional pinnings are required by local-with-pin-deps.dev:
392-
- pin-dep.dev at file://${BASEDIR}/pin-dep
393-
Pin and install them? [Y/n] n
394-
Try to install anyway, assuming `--ignore-pin-depends'? [Y/n] y
395379

396380
<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
397381
Switch invariant: []

0 commit comments

Comments
 (0)