Remove corrupt package references in db recover

When aptly crashes it is possible to get a corrupt database with a dangling key reference.
This results in an error with 'key not found', eg:

    ERROR: unable to load package Pall example-package 1.2.3 778cf6f877bf6e2d: key not found

This change makes `db recover` fix this situation by removing the dangling references.
This commit is contained in:
Silke Hofstra
2025-04-22 13:37:54 +02:00
committed by Silke Hofstra
parent c05068c2e8
commit d8a4a28259
9 changed files with 214 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
Recovering database...
Checking database integrity...
Removing dangling database reference "Pamd64 hardlink 0.2.1 daf8fcecbf8210ad"