From 61c798bbba1e85260227ca99cc8229a7d2ffc872 Mon Sep 17 00:00:00 2001 From: Kate Date: Fri, 6 Oct 2023 13:56:32 +0100 Subject: [PATCH 1/2] Make ocaml/opam:archive avoid dropping previously accessible archives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This code is untested, but I’m hoping something like that works. Feel free to modify this PR as you wish. --- src/pipeline.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pipeline.ml b/src/pipeline.ml index 611fab6..06fd33a 100644 --- a/src/pipeline.ml +++ b/src/pipeline.ml @@ -40,8 +40,10 @@ let maybe_install_secondary_compiler (run : 'a run) os_family switch = let install_package_archive opam_image = let open Dockerfile in + from ~alias:"opam-archive" "ocaml/opam:archive" from ~alias:"archive" opam_image @@ workdir "/home/opam/opam-repository" @@ + run ~mount:(mount_bind ~target:"/cache" ~from:"opam-archive") "rsync -aH /cache/cache/ /home/opam/opam-repository/cache/" @@ run "opam admin cache --link=/home/opam/opam-repository/cache" @@ from "alpine:latest" @@ copy ~chown:"0:0" ~from:"archive" ~src:["/home/opam/opam-repository/cache"] ~dst:"/cache" () From 523b378c9c2392de12f2f7c87b79250d6cbe689e Mon Sep 17 00:00:00 2001 From: Kate Date: Fri, 6 Oct 2023 13:57:22 +0100 Subject: [PATCH 2/2] Update src/pipeline.ml --- src/pipeline.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipeline.ml b/src/pipeline.ml index 06fd33a..b8a6099 100644 --- a/src/pipeline.ml +++ b/src/pipeline.ml @@ -40,7 +40,7 @@ let maybe_install_secondary_compiler (run : 'a run) os_family switch = let install_package_archive opam_image = let open Dockerfile in - from ~alias:"opam-archive" "ocaml/opam:archive" + from ~alias:"opam-archive" "ocaml/opam:archive" @@ from ~alias:"archive" opam_image @@ workdir "/home/opam/opam-repository" @@ run ~mount:(mount_bind ~target:"/cache" ~from:"opam-archive") "rsync -aH /cache/cache/ /home/opam/opam-repository/cache/" @@