@@ -25,6 +25,7 @@ use ostree_ext::tokio_util::spawn_blocking_cancellable_flatten;
25
25
use rustix:: fs:: { fsync, renameat_with, AtFlags , RenameFlags } ;
26
26
27
27
use crate :: bls_config:: { parse_bls_config, BLSConfig } ;
28
+ #[ allow( unused_imports) ]
28
29
use crate :: install:: { get_efi_uuid_source, get_user_config, BootType } ;
29
30
use crate :: progress_jsonl:: { Event , ProgressWriter , SubTaskBytes , SubTaskStep } ;
30
31
use crate :: spec:: ImageReference ;
@@ -743,40 +744,41 @@ pub(crate) async fn stage(
743
744
}
744
745
745
746
#[ 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(())
780
782
}
781
783
782
784
/// Filename for `loader/entries`
0 commit comments