]> git.ipfire.org Git - thirdparty/systemd.git/commit
sysupdate: Track incompletely-installed versions
authorAdrian Vovk <adrianvovk@gmail.com>
Tue, 2 Jul 2024 16:13:45 +0000 (12:13 -0400)
committerAdrian Vovk <adrianvovk@gmail.com>
Thu, 22 Aug 2024 20:00:45 +0000 (16:00 -0400)
commit57ada07e7aa2232eeedd75367ac55ef5bcf65f75
treecde1dcdf38aff1062c250c50141bb0b713fe4cc0
parent0402bf682fb3b11bd4fd36969abf5426f24c3dde
sysupdate: Track incompletely-installed versions

When enumerating what versions exist for a given target, sysupdate would
completely throw out any version that's incomplete (where some of the
transfers in the target have that version installed or available, and
other transfers do not).

If we're trying to find what versions we can offer for download, this is
great behavior. If the server side is advertising a partial update to
download, we shouldn't present it to the user.

On the other hand, if we're enumerating what versions we have currently
installed, this is a bad behavior. It makes sysupdate fragile. For
example, if a sysext introduces a new .conf file into
/usr/lib/sysupdate.d, suddenly the currently-installed OS stops being a
version that we've enumerated. Since it's not enumerated, it's not
protected, and so sysupdate will wipe the booted OS.

So if we're looking for installed versions, we now loosen the
restrictions and enumerate incomplete installations.

Partial fix for https://github.com/systemd/systemd/issues/33339
man/org.freedesktop.sysupdate1.xml
src/sysupdate/sysupdate-update-set-flags.c
src/sysupdate/sysupdate-update-set-flags.h
src/sysupdate/sysupdate.c
src/sysupdate/updatectl.c