diff options
author | Michael Straube <straubem@gmx.de> | 2018-06-10 18:58:34 +0200 |
---|---|---|
committer | Andrew Gregory <andrew@archlinux.org> | 2018-11-19 02:25:18 +0100 |
commit | 0dbb94538770d2ffce3709b5854d1e5e44cfc183 (patch) | |
tree | 7db8767248b073f13cb663024f617411f6de92c2 /lib/libalpm/dload.c | |
parent | 519685e4b1cff3df9bc389550fa6e19ee4ba8794 (diff) | |
download | pacman-0dbb94538770d2ffce3709b5854d1e5e44cfc183.tar.gz pacman-0dbb94538770d2ffce3709b5854d1e5e44cfc183.tar.xz |
libalpm/dload.c: add case for CURLE_COULDNT_RESOLVE_HOST
Add a case for curl error 'Could not resolve host'.
An attempt to fix FS#48285.
Signed-off-by: Michael Straube <straubem@gmx.de>
Signed-off-by: Allan McRae <allan@archlinux.org>
(cherry picked from commit 9e960d9d5a735bbc7d418f2ad81d3f3e92d99968)
Diffstat (limited to 'lib/libalpm/dload.c')
-rw-r--r-- | lib/libalpm/dload.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index cd3e4733..cca39470 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -473,6 +473,13 @@ static int curl_download_internal(struct dload_payload *payload, payload->remote_name, hostname); } goto cleanup; + case CURLE_COULDNT_RESOLVE_HOST: + payload->unlink_on_fail = 1; + handle->pm_errno = ALPM_ERR_SERVER_BAD_URL; + _alpm_log(handle, ALPM_LOG_ERROR, + _("failed retrieving file '%s' from %s : %s\n"), + payload->remote_name, hostname, error_buffer); + goto cleanup; default: /* delete zero length downloads */ if(fstat(fileno(localf), &st) == 0 && st.st_size == 0) { |