sysupdate: Repair incomplete versions in-place
authorAdrian Vovk <adrianvovk@gmail.com>
Thu, 20 Jun 2024 01:05:04 +0000 (21:05 -0400)
committerAdrian Vovk <adrianvovk@gmail.com>
Thu, 22 Aug 2024 20:00:46 +0000 (16:00 -0400)
commit631803cccd8112b420ad74195d78b0f1ae029ac7
tree4b6b0835288583cfb0a44910328d84bdcc9642bb
parent57ada07e7aa2232eeedd75367ac55ef5bcf65f75
sysupdate: Repair incomplete versions in-place

A previous commit made sysupdate recognize installed versions where some
transfers are missing. This commit teaches sysupdate how to correctly
repair these incomplete versions.

Previously, if you had a incomplete installation of the OS booted, and
ran sysupdate in an attempt to repair it, sysupdate would make things
worse by creating copies of the currently-booted partitions in the
inactive slots. Then at boot you have two identical partitions, with
identical labels an UUIDs, and end up with a mess.

With this commit, sysupdate is able to recognize situations where it can
simply download the missing transfers and leave the rest of the system
undistrubed.

Partial fix for https://github.com/systemd/systemd/issues/33339
man/org.freedesktop.sysupdate1.xml
src/sysupdate/sysupdate-transfer.c
src/sysupdate/sysupdate.c