From 3b3152fc501a1561d733c33557ff2f7be8376067 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 5 Sep 2013 16:08:23 +0200 Subject: dload: avoid renaming files downloaded via sync operations If the server redirects from ${repo}.db to ${repo}.db.tar.gz pacman gets this wrong: It saves to new filename and fails when accessing ${repo}.db. We need the remote filename only when downloading remote files with pacman's -U operation. This introduces a new field 'trust_remote_name' to payload. If set pacman downloads to the filename given by the server. The field trust_remote_name is set in alpm_fetch_pkgurl(). Fixes FS#36791 ([pacman] downloads to wrong filename with redirect). [dave: remove redundant assignment leading to memory leak] Signed-off-by: Allan McRae --- lib/libalpm/dload.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libalpm/dload.h') diff --git a/lib/libalpm/dload.h b/lib/libalpm/dload.h index 95bb91a3..6c9f7a74 100644 --- a/lib/libalpm/dload.h +++ b/lib/libalpm/dload.h @@ -38,6 +38,7 @@ struct dload_payload { int allow_resume; int errors_ok; int unlink_on_fail; + int trust_remote_name; alpm_list_t *servers; #ifdef HAVE_LIBCURL CURLcode curlerr; /* last error produced by curl */ -- cgit v1.2.3-54-g00ecf