summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2014-10-09 09:51:51 +0200
committerAllan McRae <allan@archlinux.org>2014-10-16 15:19:52 +0200
commitd8f395fb563d3988f8a3bed16808e6ac5ca56435 (patch)
treec8d74800e36b5d7d824889df64e6ab9b9f27408e /lib/libalpm
parent11dff8a50e8b1801a97a4dc08b567ae94d8060c2 (diff)
downloadpacman-d8f395fb563d3988f8a3bed16808e6ac5ca56435.tar.gz
pacman-d8f395fb563d3988f8a3bed16808e6ac5ca56435.tar.xz
dload: unlink file on filesize exceeded error
On filesize exceeded error pacman leaves a .part file in cache dir, resulting in this error on next try: error: failed to commit transaction (wrong or NULL argument passed) Errors occurred, no packages were upgraded. Unlink the file on error to avoid this.
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/dload.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 4fc2dcbb..43c15035 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -494,6 +494,7 @@ static int curl_download_internal(struct dload_payload *payload,
/* handle the interrupt accordingly */
if(dload_interrupted == ABORT_OVER_MAXFILESIZE) {
payload->curlerr = CURLE_FILESIZE_EXCEEDED;
+ payload->unlink_on_fail = 1;
handle->pm_errno = ALPM_ERR_LIBCURL;
_alpm_log(handle, ALPM_LOG_ERROR,
_("failed retrieving file '%s' from %s : expected download size exceeded\n"),