@@ -25,6 +25,7 @@ use ostree_ext::tokio_util::spawn_blocking_cancellable_flatten;
2525use rustix:: fs:: { fsync, renameat_with, AtFlags , RenameFlags } ;
2626
2727use crate :: bls_config:: { parse_bls_config, BLSConfig } ;
28+ #[ allow( unused_imports) ]
2829use crate :: install:: { get_efi_uuid_source, get_user_config, BootType } ;
2930use crate :: progress_jsonl:: { Event , ProgressWriter , SubTaskBytes , SubTaskStep } ;
3031use crate :: spec:: ImageReference ;
@@ -743,40 +744,41 @@ pub(crate) async fn stage(
743744}
744745
745746#[ context( "Rolling back UKI" ) ]
746- pub ( crate ) fn rollback_composefs_uki ( current : & BootEntry , rollback : & BootEntry ) -> Result < ( ) > {
747- let user_cfg_name = "grub2/user.cfg.staged" ;
748- let user_cfg_path = PathBuf :: from ( "boot" ) . join ( user_cfg_name) ;
749- let sysroot = & Dir :: open_ambient_dir ( "/sysroot" , cap_std:: ambient_authority ( ) ) ?;
750-
751- let efi_uuid_source = get_efi_uuid_source ( ) ;
752-
753- let rollback_verity = if let Some ( composefs) = & rollback. composefs {
754- composefs. verity . clone ( )
755- } else {
756- // Shouldn't really happen
757- anyhow:: bail!( "Verity not found for rollback deployment" )
758- } ;
759- let rollback_config = get_user_config ( todo ! ( ) , & rollback_verity) . as_bytes ( ) ;
760-
761- let current_verity = if let Some ( composefs) = & current. composefs {
762- composefs. verity . clone ( )
763- } else {
764- // Shouldn't really happen
765- anyhow:: bail!( "Verity not found for booted deployment" )
766- } ;
767- let current_config = get_user_config ( todo ! ( ) , & current_verity) . as_bytes ( ) ;
768-
769- // TODO: Need to check if user.cfg.staged exists
770- sysroot
771- . atomic_replace_with ( user_cfg_path, |w| {
772- write ! ( w, "{efi_uuid_source}" ) ?;
773- w. write_all ( rollback_config) ?;
774- w. write_all ( current_config) ?;
775- Ok ( ( ) )
776- } )
777- . with_context ( || format ! ( "Writing {user_cfg_name}" ) ) ?;
778-
779- Ok ( ( ) )
747+ pub ( crate ) fn rollback_composefs_uki ( _current : & BootEntry , _rollback : & BootEntry ) -> Result < ( ) > {
748+ unimplemented ! ( )
749+ // let user_cfg_name = "grub2/user.cfg.staged";
750+ // let user_cfg_path = PathBuf::from("boot").join(user_cfg_name);
751+ // let sysroot = &Dir::open_ambient_dir("/sysroot", cap_std::ambient_authority())?;
752+
753+ // let efi_uuid_source = get_efi_uuid_source();
754+
755+ // let rollback_verity = if let Some(composefs) = &rollback.composefs {
756+ // composefs.verity.clone()
757+ // } else {
758+ // // Shouldn't really happen
759+ // anyhow::bail!("Verity not found for rollback deployment")
760+ // };
761+ // let rollback_config = get_user_config(todo!(), &rollback_verity).as_bytes();
762+
763+ // let current_verity = if let Some(composefs) = ¤t.composefs {
764+ // composefs.verity.clone()
765+ // } else {
766+ // // Shouldn't really happen
767+ // anyhow::bail!("Verity not found for booted deployment")
768+ // };
769+ // let current_config = get_user_config(todo!(), ¤t_verity).as_bytes();
770+
771+ // // TODO: Need to check if user.cfg.staged exists
772+ // sysroot
773+ // .atomic_replace_with(user_cfg_path, |w| {
774+ // write!(w, "{efi_uuid_source}")?;
775+ // w.write_all(rollback_config)?;
776+ // w.write_all(current_config)?;
777+ // Ok(())
778+ // })
779+ // .with_context(|| format!("Writing {user_cfg_name}"))?;
780+
781+ // Ok(())
780782}
781783
782784/// Filename for `loader/entries`
0 commit comments