From 134d061295cd3837c11ff35d9d263d2308fcc603 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 11 Jan 2025 18:42:21 +0000 Subject: [PATCH] snapshots: Ignore locked snapshots and keep cleaning Signed-off-by: Michael Tremer --- src/pakfire/snapshot.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/pakfire/snapshot.c b/src/pakfire/snapshot.c index 1a9101e0f..f3df0fdf1 100644 --- a/src/pakfire/snapshot.c +++ b/src/pakfire/snapshot.c @@ -645,8 +645,16 @@ int pakfire_snapshot_clean(struct pakfire* pakfire) { // Destroy the snapshot r = pakfire_snapshot_destroy(snapshot); - if (r < 0) - goto ERROR; + if (r < 0) { + switch (-r) { + // Ignore if the snapshot is locked and move on + case EBUSY: + break; + + default: + goto ERROR; + } + } // Free the snapshot pakfire_snapshot_unref(snapshot); -- 2.47.3