Skip to main content

want_bootable_pull

Function want_bootable_pull 

Source
pub(crate) fn want_bootable_pull(
    bootable: bool,
    has_expected_digest: bool,
    xattrs: Option<XattrFiltering>,
) -> bool
Expand description

Whether an initial pull() call (from pull_stream or cfsctl’s OciCommand::Pull handler) should request the boot-transformed EROFS variant via PullOptions::bootable, so it’s produced in the same pass over the OCI layers instead of a subsequent generate_boot_image call re-walking them.

false whenever that wouldn’t actually save the second walk:

  • bootable is not requested at all.
  • has_expected_digest: the digest-recovery search path must run with generate_boot_image not yet having generated anything, so its search over every mode/version combination stays meaningful.
  • xattrs requests a non-default mode: PullOptions::bootable only supports [composefs::generic_tree::OciTransformOptions::default()].

pub(crate) so cfsctl’s own OciCommand::Pull handler in lib.rs can share this decision table instead of duplicating it.