Skip to content

Commit

Permalink
Merge pull request containers#675 from ckyrouac/pre-fetch-prep
Browse files Browse the repository at this point in the history
deploy: Return Deployment from deploy function
  • Loading branch information
cgwalters authored Jul 11, 2024
2 parents 9d3abf2 + 98b2903 commit eb75a2b
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions lib/src/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,20 +328,21 @@ async fn deploy(
image: &ImageState,
origin: &glib::KeyFile,
opts: Option<ostree::SysrootDeployTreeOpts<'_>>,
) -> Result<()> {
) -> Result<Deployment> {
let stateroot = Some(stateroot);
let opts = opts.unwrap_or_default();
// Copy to move into thread
let cancellable = gio::Cancellable::NONE;
let _new_deployment = sysroot.stage_tree_with_options(
stateroot,
image.ostree_commit.as_str(),
Some(origin),
merge_deployment,
&opts,
cancellable,
)?;
Ok(())
return sysroot
.stage_tree_with_options(
stateroot,
image.ostree_commit.as_str(),
Some(origin),
merge_deployment,
&opts,
cancellable,
)
.map_err(Into::into);
}

#[context("Generating origin")]
Expand Down

0 comments on commit eb75a2b

Please sign in to comment.