@@ -819,13 +819,29 @@ async fn upgrade_composefs(_opts: UpgradeOpts) -> Result<()> {
819819 } ;
820820
821821 let boot_type = BootType :: from ( & entry) ;
822+ let mut boot_digest = None ;
822823
823824 match boot_type {
824- BootType :: Bls => setup_composefs_bls_boot ( BootSetupType :: Upgrade , repo, & id, entry) ,
825- BootType :: Uki => setup_composefs_uki_boot ( BootSetupType :: Upgrade , repo, & id, entry) ,
826- } ?;
825+ BootType :: Bls => {
826+ boot_digest = Some ( setup_composefs_bls_boot (
827+ BootSetupType :: Upgrade ,
828+ repo,
829+ & id,
830+ entry,
831+ ) ?)
832+ }
827833
828- write_composefs_state ( & Utf8PathBuf :: from ( "/sysroot" ) , id, imgref, true , boot_type) ?;
834+ BootType :: Uki => setup_composefs_uki_boot ( BootSetupType :: Upgrade , repo, & id, entry) ?,
835+ } ;
836+
837+ write_composefs_state (
838+ & Utf8PathBuf :: from ( "/sysroot" ) ,
839+ id,
840+ imgref,
841+ true ,
842+ boot_type,
843+ boot_digest,
844+ ) ?;
829845
830846 Ok ( ( ) )
831847}
@@ -987,18 +1003,27 @@ async fn switch_composefs(opts: SwitchOpts) -> Result<()> {
9871003 } ;
9881004
9891005 let boot_type = BootType :: from ( & entry) ;
1006+ let mut boot_digest = None ;
9901007
9911008 match boot_type {
992- BootType :: Bls => setup_composefs_bls_boot ( BootSetupType :: Upgrade , repo, & id, entry) ,
993- BootType :: Uki => setup_composefs_uki_boot ( BootSetupType :: Upgrade , repo, & id, entry) ,
994- } ?;
1009+ BootType :: Bls => {
1010+ boot_digest = Some ( setup_composefs_bls_boot (
1011+ BootSetupType :: Upgrade ,
1012+ repo,
1013+ & id,
1014+ entry,
1015+ ) ?)
1016+ }
1017+ BootType :: Uki => setup_composefs_uki_boot ( BootSetupType :: Upgrade , repo, & id, entry) ?,
1018+ } ;
9951019
9961020 write_composefs_state (
9971021 & Utf8PathBuf :: from ( "/sysroot" ) ,
9981022 id,
9991023 & target_imgref,
10001024 true ,
10011025 boot_type,
1026+ boot_digest,
10021027 ) ?;
10031028
10041029 Ok ( ( ) )
0 commit comments