Skip to content

Commit 98b2903

Browse files
committed
deploy: Return Deployment from deploy function
This is preparation for the lifecycle bound image work. It will need access to the Deployment to read the bound image spec files. Signed-off-by: Chris Kyrouac <[email protected]>
1 parent 5e9279d commit 98b2903

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

lib/src/deploy.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -278,20 +278,21 @@ async fn deploy(
278278
image: &ImageState,
279279
origin: &glib::KeyFile,
280280
opts: Option<ostree::SysrootDeployTreeOpts<'_>>,
281-
) -> Result<()> {
281+
) -> Result<Deployment> {
282282
let stateroot = Some(stateroot);
283283
let opts = opts.unwrap_or_default();
284284
// Copy to move into thread
285285
let cancellable = gio::Cancellable::NONE;
286-
let _new_deployment = sysroot.stage_tree_with_options(
287-
stateroot,
288-
image.ostree_commit.as_str(),
289-
Some(origin),
290-
merge_deployment,
291-
&opts,
292-
cancellable,
293-
)?;
294-
Ok(())
286+
return sysroot
287+
.stage_tree_with_options(
288+
stateroot,
289+
image.ostree_commit.as_str(),
290+
Some(origin),
291+
merge_deployment,
292+
&opts,
293+
cancellable,
294+
)
295+
.map_err(Into::into);
295296
}
296297

297298
#[context("Generating origin")]

0 commit comments

Comments
 (0)