(
sysroot: &Dir,
run: &Dir,
sepolicy: Option<ostree::SePolicy>,
)
| 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>> { |
no outgoing calls