Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAnatol Pomozov <anatol.pomozov@gmail.com>2020-09-14 18:52:56 -0700
committerAllan McRae <allan@archlinux.org>2020-09-23 17:12:01 +1000
commitff7ff3c58dcdb858c253e8e7fea1d758cdff0312 (patch)
tree404844a11fb5656b0965ed462d2eee39ac3fcc00 /lib
parentd85d9c8c6044bc58963c41df8b6c15de1356ab2f (diff)
FS#66472: Remove *.sig file if package corrupted
In case if a package corrupted (e.g. signature or hash is invalid) pacman tries to remove the package file to redownload it anew the next time. Remove *.sig file as well to make sure no data is left for the invalid package. Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/sync.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 9350793a..601f1d69 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -688,7 +688,13 @@ static int prompt_to_delete(alpm_handle_t *handle, const char *filepath,
};
QUESTION(handle, &question);
if(question.remove) {
+ char *sig_filepath;
+
unlink(filepath);
+
+ sig_filepath = _alpm_sigpath(handle, filepath);
+ unlink(sig_filepath);
+ FREE(sig_filepath);
}
return question.remove;
}