From 241f96b9f9c332b5f858542e3cf2743c79abf078 Mon Sep 17 00:00:00 2001 From: Kate Date: Fri, 27 Jan 2023 16:02:55 +0000 Subject: [PATCH] fixup! Hackish workaround for https://github.com/ocurrent/obuilder/issues/77 --- lib/opam_build.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/opam_build.ml b/lib/opam_build.ml index 4caa1887..245be63b 100644 --- a/lib/opam_build.ml +++ b/lib/opam_build.ml @@ -41,12 +41,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";