rollback_composefs_entries

Function rollback_composefs_entries 

Source
fn rollback_composefs_entries(
    boot_dir: &Dir,
    bootloader: Bootloader,
) -> Result<()>
Expand description

Performs rollback for

  • Grub Type1 boot entries
  • Systemd Typ1 boot entries
  • Systemd UKI (Type2) boot entries [since we use BLS entries for systemd boot]

Cases

  1. We’re actually booted into the deployment that has it’s sort_key as 0 a. Just swap the primary and secondary bootloader entries b. If they’re already swapped (rollback was queued), re-swap them (unqueue rollback)

  2. We’re booted into the depl with sort_key 1 (choose the rollback deployment on boot screen) a. Here we assume that rollback is queued as there’s no way to differentiate between this case and Case 1-b. This is what ostree does as well