Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/error.c')
-rw-r--r--lib/libalpm/error.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c
index 49eca544..30e9cf86 100644
--- a/lib/libalpm/error.c
+++ b/lib/libalpm/error.c
@@ -19,7 +19,9 @@
#include "config.h"
+#if defined(INTERNAL_DOWNLOAD)
#include <download.h> /* downloadLastErrString */
+#endif
/* libalpm */
#include "util.h"
@@ -132,9 +134,6 @@ const char SYMEXPORT *alpm_strerror(int err)
return _("not confirmed");
case PM_ERR_INVALID_REGEX:
return _("invalid regular expression");
- /* Downloading */
- case PM_ERR_CONNECT_FAILED:
- return _("connection to remote host failed");
/* Errors from external libraries- our own wrapper error */
case PM_ERR_LIBARCHIVE:
/* it would be nice to use archive_error_string() here, but that
@@ -142,7 +141,14 @@ const char SYMEXPORT *alpm_strerror(int err)
* error string instead. */
return _("libarchive error");
case PM_ERR_LIBDOWNLOAD:
+#if defined(INTERNAL_DOWNLOAD)
return downloadLastErrString;
+#else
+ /* obviously shouldn't get here... */
+ return _("libdownload error");
+#endif
+ case PM_ERR_EXTERNAL_DOWNLOAD:
+ return _("error invoking external downloader");
/* Unknown error! */
default:
return _("unexpected error");