On 15/9/20 11:52 am, Anatol Pomozov wrote:
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> --- lib/libalpm/sync.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 9350793a..9397575a 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_filename; + unlink(filepath); + + sig_filename = _alpm_sigpath(handle, filepath); + unlink(sig_filename); + FREE(sig_filename);
So... You have "filepath" and use the function "_alpm_sigpath()", and then call the variable "sig_filename". Needs to be sig_filepath! I'll change that and apply.
} return question.remove; }