Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: Thread Storage through more places #732

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/src/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ pub(crate) async fn pull(
Ok(Box::new((*import).into()))
}

pub(crate) async fn cleanup(sysroot: &SysrootLock) -> Result<()> {
pub(crate) async fn cleanup(sysroot: &Storage) -> Result<()> {
// We create clones (just atomic reference bumps) here to move to the thread.
let repo = sysroot.repo();
let sysroot = sysroot.sysroot.clone();
Expand Down Expand Up @@ -329,7 +329,7 @@ pub(crate) fn get_base_commit(repo: &ostree::Repo, commit: &str) -> Result<Optio

#[context("Writing deployment")]
async fn deploy(
sysroot: &SysrootLock,
sysroot: &Storage,
merge_deployment: Option<&Deployment>,
stateroot: &str,
image: &ImageState,
Expand Down Expand Up @@ -383,7 +383,7 @@ fn origin_from_imageref(imgref: &ImageReference) -> Result<glib::KeyFile> {
/// Stage (queue deployment of) a fetched container image.
#[context("Staging")]
pub(crate) async fn stage(
sysroot: &SysrootLock,
sysroot: &Storage,
stateroot: &str,
image: &ImageState,
spec: &RequiredHostSpec<'_>,
Expand Down
4 changes: 2 additions & 2 deletions lib/src/kargs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ use ostree_ext::ostree::Deployment;
use ostree_ext::prelude::Cast;
use ostree_ext::prelude::FileEnumeratorExt;
use ostree_ext::prelude::FileExt;
use ostree_ext::sysroot::SysrootLock;
use serde::Deserialize;

use crate::deploy::ImageState;
use crate::store::Storage;

/// The kargs.d configuration file.
#[derive(Deserialize)]
Expand Down Expand Up @@ -96,7 +96,7 @@ fn get_kargs_from_ostree(
/// karg, but applies the diff between the bootc karg files in /usr/lib/bootc/kargs.d
/// between the booted deployment and the new one.
pub(crate) fn get_kargs(
sysroot: &SysrootLock,
sysroot: &Storage,
merge_deployment: &Deployment,
fetched: &ImageState,
) -> Result<Vec<String>> {
Expand Down