Skip to content

Commit

Permalink
fixup! Hackish workaround for ocurrent/obuilder#77
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate committed Jan 27, 2023
1 parent 5a3b7bc commit f509ab3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/opam_build.ml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ let opam_install ~variant ~opam_version ~pin ~lower_bounds ~with_tests ~pkg =
(if with_tests then [
(* TODO: Remove this hack when https://github.com/ocurrent/obuilder/issues/77 is fixed *)
(* NOTE: This hack will fail for packages that have src: "git+https://..." *)
run ~cache ~network "(%sopam reinstall --with-test %s) || true"
run ~network "(%sopam reinstall --with-test %s) || true"
(match opam_version with `V2_1 | `Dev -> "" | `V2_0 -> fmt "opam depext%s %s && " with_tests_opt pkg) pkg
] else []) @ [
(* TODO: Replace by two calls to opam install + opam install -t using the OPAMDROPINSTALLEDPACKAGES feature *)
(* NOTE: See above for the ~network:(if with_tests ...) hack *)
run ~cache ~network:(if with_tests then [] else network)
(* NOTE: We cannot use the cache as concurrent access to the cache might overwrite it and the required archives might not be available anymore at this point *)
run ~cache:(if with_tests then [] else cache) ~network:(if with_tests then [] else network)
{|%sopam reinstall%s%s %s;
res=$?;
test "$res" != 31 && exit "$res";
Expand Down

0 comments on commit f509ab3

Please sign in to comment.