diff options
author | Allan McRae <allan@archlinux.org> | 2024-06-19 17:31:54 +1000 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2024-06-19 17:38:07 +1000 |
commit | c9acfc2b50b79390c58d8aa52a134030e7cec58a (patch) | |
tree | 1beb8f9d06fb0182cd68b03763e8108e7e679731 | |
parent | b60b779fc83396c9f4c6816389646e697f7ee2a9 (diff) |
Fix error when downloading signature file for an existing package file
If a package was already downloaded but its signature file was not,
pacman would download the signature then error out despite all files
being present.
Also fixes a similar error when some, but not all, package databases
were updated with -Sy.
Fixes #156
Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r-- | lib/libalpm/dload.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 9815d474..da2ca24c 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -1108,7 +1108,10 @@ static int finalize_download_locations(alpm_list_t *payloads, const char *localp int ret = move_file(payload->destfile_name, localpath); if(ret == -1) { - returnvalue = -1; + /* ignore error if the file already existed - only signature file was downloaded */ + if(payload->mtime_existing_file == 0) { + returnvalue = -1; + } } if (payload->download_signature) { |