Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/install: ensure invalidating slot status before updating
For the global slot status, RAUC kept the status information untouched until a slot was actually fully written. In most cases this is not a problem, except for when RAUC crashes during a slot update and slot skipping (install-same=true) is enabled. Then the respective slot might be broken but the status information makes it look in good shape. Thus RAUC will skip it if the to-be-installed checksum is equal to the one noted in the status file. For this case, we would end up in an unusable installation. Fix this by explicitly marking the status 'pending' and clearing the checksum. This then also compatible with older RAUC installation (e.g. in case of fallbacks) that can handle missing checksum an will thus not erroneously assume a valid slot. For the per-slot case this is not an issue since the status file is stored on the slot and will thus be removed when updating the slot with new content. Signed-off-by: Enrico Joerns <ejo@pengutronix.de>
- Loading branch information