Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
DB: in case of remote db corrompted destroy it to give a change to rebuild
Baptiste Daroussin committed 18 days ago
commit 30a4ebb86a589be41fff8b7dac70d7cbd514b018
parent e9abac3
1 file changed +3 -0
modified libpkg/repo/binary/update.c
@@ -829,6 +829,9 @@ pkg_repo_binary_update(struct pkg_repo *repo, bool force)
	res = pkg_repo_binary_update_proceed(filename, repo, &t, force);
	if (res != EPKG_OK && res != EPKG_UPTODATE) {
		pkg_emit_notice("Unable to update repository %s", repo->name);
+
		/* Remove potentially corrupted repo database so the
+
		 * next update can start fresh */
+
		unlink(filename);
		goto cleanup;
	}