Lindley Vieira 515a5ff9c9 Fix to remove old ostree deployments
In order to save memory the system deletes old ostree deployments,
after a reboot required update/upgrade. But in some cases, it was
not deleting them.

This commit fixes it, by creating a unique flag to say if the system
was rebooted after an update/upgrade.
Using this flag the agent can perform operations after the reboot.
This flag is saved under /var/persist, a folder that persists
between deployments.

Test-plan:
PASS: Install patches 22.12
PASS: Remove patches 22.12
PASS: Install patches 24.09
PASS: Remove patches 24.09
PASS: Rollback patches 24.09
PASS: Install major release 22.12 to 24.09
PASS: Rollback major release (during an upgrade from 22.12 to 24.09)
PASS: Apply/Remove 24.09 patch before bootstrap

Closes-bug: 2098029

Change-Id: I9e8cbea83e95f7cf8fe2af505766d476fcd3aee7
Signed-off-by: Lindley Vieira <lindley.vieira@windriver.com>
2025-02-11 19:50:07 +00:00
..