]> git.ipfire.org Git - pakfire.git/commitdiff
snapshots: Ignore locked snapshots and keep cleaning
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 11 Jan 2025 18:42:21 +0000 (18:42 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 11 Jan 2025 18:42:21 +0000 (18:42 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/snapshot.c

index 1a9101e0f87b68d9cd76bf143aaa89914b0ba640..f3df0fdf1909b8910493f6880e9c38a17ea1e9a8 100644 (file)
@@ -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);