@@ -44,6 +44,7 @@ use self::baseline::InstallBlockDeviceOpts;
44
44
use crate :: containerenv:: ContainerExecutionInfo ;
45
45
use crate :: mount:: Filesystem ;
46
46
use crate :: spec:: ImageReference ;
47
+ use crate :: store:: Storage ;
47
48
use crate :: task:: Task ;
48
49
use crate :: utils:: sigpolicy_from_opts;
49
50
@@ -549,7 +550,7 @@ pub(crate) fn print_configuration() -> Result<()> {
549
550
}
550
551
551
552
#[ context( "Creating ostree deployment" ) ]
552
- async fn initialize_ostree_root ( state : & State , root_setup : & RootSetup ) -> Result < ostree :: Sysroot > {
553
+ async fn initialize_ostree_root ( state : & State , root_setup : & RootSetup ) -> Result < Storage > {
553
554
let sepolicy = state. load_policy ( ) ?;
554
555
let sepolicy = sepolicy. as_ref ( ) ;
555
556
// Load a fd for the mounted target physical root
@@ -608,7 +609,8 @@ async fn initialize_ostree_root(state: &State, root_setup: &RootSetup) -> Result
608
609
609
610
let sysroot = ostree:: Sysroot :: new ( Some ( & gio:: File :: for_path ( rootfs) ) ) ;
610
611
sysroot. load ( cancellable) ?;
611
- Ok ( sysroot)
612
+ let sysroot = SysrootLock :: new_from_sysroot ( & sysroot) . await ?;
613
+ Storage :: new ( sysroot)
612
614
}
613
615
614
616
#[ context( "Creating ostree deployment" ) ]
@@ -1270,11 +1272,10 @@ async fn prepare_install(
1270
1272
async fn install_with_sysroot (
1271
1273
state : & State ,
1272
1274
rootfs : & RootSetup ,
1273
- sysroot : & ostree :: Sysroot ,
1275
+ sysroot : & Storage ,
1274
1276
boot_uuid : & str ,
1275
1277
bound_images : & [ crate :: boundimage:: ResolvedBoundImage ] ,
1276
1278
) -> Result < ( ) > {
1277
- let sysroot = SysrootLock :: new_from_sysroot ( & sysroot) . await ?;
1278
1279
// And actually set up the container in that root, returning a deployment and
1279
1280
// the aleph state (see below).
1280
1281
let ( deployment, aleph) = install_container ( state, rootfs, & sysroot) . await ?;
0 commit comments