From: Michael Tremer Date: Sat, 11 Jan 2025 18:42:21 +0000 (+0000) Subject: snapshots: Ignore locked snapshots and keep cleaning X-Git-Tag: 0.9.30~419 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=134d061295cd3837c11ff35d9d263d2308fcc603;p=pakfire.git snapshots: Ignore locked snapshots and keep cleaning Signed-off-by: Michael Tremer --- 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);