sysupdate: Allow instances to be partial or pending

If we allow target instances to be partial or pending, we can build on
top of this to allow updates to be split into two phases: ‘acquire’ (which
takes an available source instance and copies it (temporarily partial) to
a pending target instance; and ‘install’ (which takes a pending target
instance and installs it as an installed target instance).

This commit introduces a file/directory and partition prefix naming
scheme to identify partial and pending instances.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: https://github.com/systemd/systemd/issues/34814
This commit is contained in:
Philip Withnall
2026-02-09 11:54:40 +00:00
parent ec10efa1a1
commit fdc661116d
2 changed files with 56 additions and 6 deletions
+4 -1
View File
@@ -45,8 +45,11 @@ struct Instance {
InstanceMetadata metadata;
/* Where we found the instance */
char *path;
char *path; /* includes the `.sysupdate.partial.` (etc.) prefix, if applicable */
PartitionInfo partition_info;
bool is_partial;
bool is_pending;
};
void instance_metadata_destroy(InstanceMetadata *m);