File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ use ostree_ext::keyfileext::KeyFileExt;
2121use ostree_ext:: ostree;
2222use schemars:: schema_for;
2323
24- use crate :: deploy:: wipe_ostree;
2524use crate :: deploy:: RequiredHostSpec ;
2625use crate :: lints;
2726use crate :: spec:: Host ;
@@ -929,7 +928,7 @@ async fn run_from_opt(opt: Opt) -> Result<()> {
929928 StateOpts :: WipeOstree => {
930929 let sysroot = ostree:: Sysroot :: new_default ( ) ;
931930 sysroot. load ( gio:: Cancellable :: NONE ) ?;
932- wipe_ostree ( & sysroot) . await ?;
931+ crate :: deploy :: wipe_ostree ( sysroot) . await ?;
933932 Ok ( ( ) )
934933 }
935934 } ,
Original file line number Diff line number Diff line change @@ -288,10 +288,13 @@ pub(crate) async fn prune_container_store(sysroot: &Storage) -> Result<()> {
288288 Ok ( ( ) )
289289}
290290
291- pub ( crate ) async fn wipe_ostree ( sysroot : & Sysroot ) -> Result < ( ) > {
292- sysroot
293- . write_deployments ( & [ ] , gio:: Cancellable :: NONE )
294- . context ( "removing deployments" ) ?;
291+ pub ( crate ) async fn wipe_ostree ( sysroot : Sysroot ) -> Result < ( ) > {
292+ tokio:: task:: spawn_blocking ( move || {
293+ sysroot
294+ . write_deployments ( & [ ] , gio:: Cancellable :: NONE )
295+ . context ( "removing deployments" )
296+ } )
297+ . await ??;
295298
296299 Ok ( ( ) )
297300}
You can’t perform that action at this time.
0 commit comments