Skip to content

Commit a37ca01

Browse files
committed
cli: Thread Storage through more places
This is prep for switching over bound images to use the bootc container storage (and I think is what we want for the bootc-using container-storage). In the future I think we can actually stop using the magic `Deref` implementation actually too. Signed-off-by: Colin Walters <[email protected]>
1 parent a557143 commit a37ca01

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/src/deploy.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ pub(crate) async fn pull(
268268
Ok(Box::new((*import).into()))
269269
}
270270

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

330330
#[context("Writing deployment")]
331331
async fn deploy(
332-
sysroot: &SysrootLock,
332+
sysroot: &Storage,
333333
merge_deployment: Option<&Deployment>,
334334
stateroot: &str,
335335
image: &ImageState,
@@ -383,7 +383,7 @@ fn origin_from_imageref(imgref: &ImageReference) -> Result<glib::KeyFile> {
383383
/// Stage (queue deployment of) a fetched container image.
384384
#[context("Staging")]
385385
pub(crate) async fn stage(
386-
sysroot: &SysrootLock,
386+
sysroot: &Storage,
387387
stateroot: &str,
388388
image: &ImageState,
389389
spec: &RequiredHostSpec<'_>,

lib/src/kargs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ use ostree_ext::ostree::Deployment;
1010
use ostree_ext::prelude::Cast;
1111
use ostree_ext::prelude::FileEnumeratorExt;
1212
use ostree_ext::prelude::FileExt;
13-
use ostree_ext::sysroot::SysrootLock;
1413
use serde::Deserialize;
1514

1615
use crate::deploy::ImageState;
16+
use crate::store::Storage;
1717

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

0 commit comments

Comments
 (0)