Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/install: support for A/B/C update
So far, RAUC theoretically supported having three slot groups (e.g. rootfs.0, rootfs.1, rootfs.2), but the slot selection algorithm prevented from using them for an A/B/C update. The algorithm simply selected the 'first' inactive slot group. The 'first' group is implementation-defined by the data type used (i.e. by the GHashTable). As a result, updating always alternated between two slot groups. This commit now introduces a slightly more sophisticated slot selection algorithm which always selects the slot group with the oldest installation date. Selecting the oldest installation date automatically ensures that all slots get their turn since once a slot is updated, it has the most recent timestamp and will be selected last. A slot that has no installation date yet is considered outdated. Signed-off-by: Enrico Joerns <[email protected]>
- Loading branch information