@@ -20,7 +20,7 @@ use ostree_container::store::PrepareResult;
2020use ostree_ext:: composefs:: fsverity;
2121use ostree_ext:: composefs:: fsverity:: FsVerityHashValue ;
2222use ostree_ext:: container as ostree_container;
23- use ostree_ext:: container_utils:: { composefs_booted , ostree_booted} ;
23+ use ostree_ext:: container_utils:: ostree_booted;
2424use ostree_ext:: keyfileext:: KeyFileExt ;
2525use ostree_ext:: ostree;
2626use schemars:: schema_for;
@@ -36,7 +36,7 @@ use crate::progress_jsonl::{ProgressWriter, RawProgressFd};
3636use crate :: spec:: Host ;
3737use crate :: spec:: ImageReference ;
3838use crate :: status:: composefs_deployment_status;
39- use crate :: utils:: sigpolicy_from_opt;
39+ use crate :: utils:: { composefs_booted , sigpolicy_from_opt} ;
4040
4141/// Shared progress options
4242#[ derive( Debug , Parser , PartialEq , Eq ) ]
@@ -798,13 +798,29 @@ async fn upgrade_composefs(_opts: UpgradeOpts) -> Result<()> {
798798 } ;
799799
800800 let boot_type = BootType :: from ( & entry) ;
801+ let mut boot_digest = None ;
801802
802803 match boot_type {
803- BootType :: Bls => setup_composefs_bls_boot ( BootSetupType :: Upgrade , repo, & id, entry) ,
804- BootType :: Uki => setup_composefs_uki_boot ( BootSetupType :: Upgrade , repo, & id, entry) ,
805- } ?;
804+ BootType :: Bls => {
805+ boot_digest = Some ( setup_composefs_bls_boot (
806+ BootSetupType :: Upgrade ,
807+ repo,
808+ & id,
809+ entry,
810+ ) ?)
811+ }
806812
807- write_composefs_state ( & Utf8PathBuf :: from ( "/sysroot" ) , id, imgref, true , boot_type) ?;
813+ BootType :: Uki => setup_composefs_uki_boot ( BootSetupType :: Upgrade , repo, & id, entry) ?,
814+ } ;
815+
816+ write_composefs_state (
817+ & Utf8PathBuf :: from ( "/sysroot" ) ,
818+ id,
819+ imgref,
820+ true ,
821+ boot_type,
822+ boot_digest,
823+ ) ?;
808824
809825 Ok ( ( ) )
810826}
@@ -966,18 +982,27 @@ async fn switch_composefs(opts: SwitchOpts) -> Result<()> {
966982 } ;
967983
968984 let boot_type = BootType :: from ( & entry) ;
985+ let mut boot_digest = None ;
969986
970987 match boot_type {
971- BootType :: Bls => setup_composefs_bls_boot ( BootSetupType :: Upgrade , repo, & id, entry) ,
972- BootType :: Uki => setup_composefs_uki_boot ( BootSetupType :: Upgrade , repo, & id, entry) ,
973- } ?;
988+ BootType :: Bls => {
989+ boot_digest = Some ( setup_composefs_bls_boot (
990+ BootSetupType :: Upgrade ,
991+ repo,
992+ & id,
993+ entry,
994+ ) ?)
995+ }
996+ BootType :: Uki => setup_composefs_uki_boot ( BootSetupType :: Upgrade , repo, & id, entry) ?,
997+ } ;
974998
975999 write_composefs_state (
9761000 & Utf8PathBuf :: from ( "/sysroot" ) ,
9771001 id,
9781002 & target_imgref,
9791003 true ,
9801004 boot_type,
1005+ boot_digest,
9811006 ) ?;
9821007
9831008 Ok ( ( ) )
0 commit comments