summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_sync.c
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-08-18 14:17:30 -0400
committerDan McGee <dan@archlinux.org>2011-08-19 09:43:19 -0500
commit24824b54ce6ce3f62417be493d1e29eeb2cc8f53 (patch)
tree78741e41a4a54a786b4d4e9769160647613f6e9d /lib/libalpm/be_sync.c
parent2ca27ab3a14c106a7153dda337a61c79db7a6de0 (diff)
downloadpacman-24824b54ce6ce3f62417be493d1e29eeb2cc8f53.tar.xz
dload: add 'unlink_on_fail' to payload struct
Let callers of _alpm_download state whether we should delete on fail, rather than inferring it from context. We still override this decision and always unlink when a temp file is used. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_sync.c')
-rw-r--r--lib/libalpm/be_sync.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 2db7ce58..75f06645 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -197,6 +197,7 @@ int SYMEXPORT alpm_db_update(int force, alpm_db_t *db)
snprintf(payload->fileurl, len, "%s/%s.db", server, db->treename);
payload->handle = handle;
payload->force = force;
+ payload->unlink_on_fail = 1;
ret = _alpm_download(payload, syncpath, NULL);