Merge "libsnapshot: Cleanup temp metadata during rollback" into main am: 326534aace am: f670036b82

Original change: https://android-review.googlesource.com/c/platform/system/core/+/3388019

Change-Id: I938234657fbe9e3d2b386e8eb7168878a13aa75e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2024-12-02 23:15:26 +00:00 committed by Automerger Merge Worker
commit 11c2fedb4d

View file

@ -2404,6 +2404,9 @@ bool SnapshotManager::NeedSnapshotsInFirstStageMount() {
PLOG(ERROR) << "Unable to write rollback indicator: " << path;
} else {
LOG(INFO) << "Rollback detected, writing rollback indicator to " << path;
if (device_->IsTempMetadata()) {
CleanupScratchOtaMetadataIfPresent();
}
}
}
LOG(INFO) << "Not booting from new slot. Will not mount snapshots.";