Open fluoriteByte opened 7 months ago
Yeah, it should be possible to abort until the "safe point". Though currently it's not defined correctly. It's here: https://github.com/Vanilla-OS/ABRoot/blob/1c3f672d4bea734b6e02425ff63a67698a54ae6b/core/system.go#L700-L705
This information is wrong, Generating the Fstab, crypttab and systemd mount units will not leave the system in an inconsistant state. It only affects the .system.new folder, which is completely independant.
The actual "safe point" would be before these lines probably: https://github.com/Vanilla-OS/ABRoot/blob/1c3f672d4bea734b6e02425ff63a67698a54ae6b/core/system.go#L815-L818
I think this is the first time something from the old future system is overwritten, but this needs to be evaluated further.
One additional thing: We would probably need to capture "os.Interrupt" so that we can clean up the lockfile even if the user interrupts with Ctrl+C.
i think abroot should be able to unlock itself if the user cancelled an upgrade or if the upgrade pre-staging fails (during update check or during download) it gets kinda annoying trying to test abroot when it keeps locking up needing a reboot