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;
21
21
use ostree_ext:: ostree;
22
22
use schemars:: schema_for;
23
23
24
- use crate :: deploy:: wipe_ostree;
25
24
use crate :: deploy:: RequiredHostSpec ;
26
25
use crate :: lints;
27
26
use crate :: spec:: Host ;
@@ -929,7 +928,7 @@ async fn run_from_opt(opt: Opt) -> Result<()> {
929
928
StateOpts :: WipeOstree => {
930
929
let sysroot = ostree:: Sysroot :: new_default ( ) ;
931
930
sysroot. load ( gio:: Cancellable :: NONE ) ?;
932
- wipe_ostree ( & sysroot) . await ?;
931
+ crate :: deploy :: wipe_ostree ( sysroot) . await ?;
933
932
Ok ( ( ) )
934
933
}
935
934
} ,
Original file line number Diff line number Diff line change @@ -288,10 +288,13 @@ pub(crate) async fn prune_container_store(sysroot: &Storage) -> Result<()> {
288
288
Ok ( ( ) )
289
289
}
290
290
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 ??;
295
298
296
299
Ok ( ( ) )
297
300
}
You can’t perform that action at this time.
0 commit comments