MCPcopy Create free account
hub / github.com/bootc-dev/bootc / open

Method open

crates/lib/src/podstorage.rs:336–358  ·  view source on GitHub ↗
(
        sysroot: &Dir,
        run: &Dir,
        sepolicy: Option<ostree::SePolicy>,
    )

Source from the content-addressed store, hash-verified

334
335 #[context("Opening imgstorage")]
336 pub(crate) fn open(
337 sysroot: &Dir,
338 run: &Dir,
339 sepolicy: Option<ostree::SePolicy>,
340 ) -> Result<Self> {
341 tracing::trace!("Opening container image store");
342 Self::init_globals()?;
343 let subpath = &Self::subpath();
344 let storage_root = sysroot
345 .open_dir(subpath)
346 .with_context(|| format!("Opening {subpath}"))?;
347 // Always auto-create this if missing
348 run.create_dir_all(RUNROOT)
349 .with_context(|| format!("Creating {RUNROOT}"))?;
350 let run = run.open_dir(RUNROOT)?;
351 Ok(Self {
352 sysroot: sysroot.try_clone()?,
353 storage_root,
354 run,
355 sepolicy,
356 _unsync: Default::default(),
357 })
358 }
359
360 #[context("Listing images")]
361 pub(crate) async fn list_images(&self) -> Result<Vec<crate::podman::ImageListEntry>> {

Callers 15

recurse_dirFunction · 0.80
test_etc_diff_plus_mergeFunction · 0.80
read_tmpfiles_from_dirFunction · 0.80
read_sysusersFunction · 0.80
load_etc_groupFunction · 0.80
find_kernelFunction · 0.80
handle_kernel_relocationFunction · 0.80
verity_state_of_objectsFunction · 0.80
selinux_set_permissiveFunction · 0.80
fixup_etc_fstabFunction · 0.80

Calls

no outgoing calls

Tested by 5

test_etc_diff_plus_mergeFunction · 0.64
test_tar_import_signedFunction · 0.64
test_tar_import_exportFunction · 0.64
test_tar_writeFunction · 0.64