Minimal bootable disk image builder
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(oci): filter checkout by platform to match fetch behavior

Fetch skips downloading blobs for non-matching platforms, but checkout
was trying to extract all platforms' layers. Add ?platform parameter to
Oci.checkout to filter manifest descriptors, matching fetch's behavior.

+3 -3
+3 -3
lib/source.ml
··· 65 65 Fmt.pr "Fetching %a...@." Oci.Image.pp image; 66 66 Oci.fetch ~show_progress:true ?platform ~cache ~client ~domain_mgr image 67 67 68 - let oci_checkout ~env ~cache ~checkout_dir image = 68 + let oci_checkout ~env ~cache ~checkout_dir ?platform image = 69 69 let fs = Eio.Stdenv.fs env in 70 70 Eio.Path.mkdirs ~exists_ok:true ~perm:0o755 Eio.Path.(fs / checkout_dir); 71 71 let root = Eio.Path.(fs / checkout_dir) in 72 - Oci.checkout ~cache ~root image 72 + Oci.checkout ?platform ~cache ~root image 73 73 74 74 let resolve ~env ~names ?platform spec = 75 75 let fs = Eio.Stdenv.fs env in ··· 100 100 | None -> ( 101 101 let cache = oci_cache xdge in 102 102 oci_fetch ~env ~cache ?platform image; 103 - oci_checkout ~env ~cache ~checkout_dir:checkout image; 103 + oci_checkout ~env ~cache ~checkout_dir:checkout ?platform image; 104 104 match find_in fs ~names image_dir with 105 105 | Some path -> 106 106 Fmt.pr " %s@." path;