summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-12-11 02:45:15 +0100
committerDan McGee <dan@archlinux.org>2008-12-11 02:45:15 +0100
commitcc7f3b705e1c3a1fdc356942134456559ce69230 (patch)
tree5cf6644b15a927bcdf524b2981c705495f36a975
parent89b0a76b3cd6840731f856b358e33d5771e9e1c5 (diff)
downloadpacman-cc7f3b705e1c3a1fdc356942134456559ce69230.tar.gz
pacman-cc7f3b705e1c3a1fdc356942134456559ce69230.tar.xz
Print proxy information when downloading
May help debug issues we come across with proxy behavior (e.g. those pesky segfaults) as well as be informative to the user when things aren't working quite right. Addresses FS#12396. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--lib/libalpm/dload.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 9b082943..ca13652e 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -142,6 +142,12 @@ static int download_internal(const char *url, const char *localpath,
dl_thisfile = 0;
}
+ /* print proxy info for debug purposes */
+ _alpm_log(PM_LOG_DEBUG, "HTTP_PROXY: %s\n", getenv("HTTP_PROXY"));
+ _alpm_log(PM_LOG_DEBUG, "http_proxy: %s\n", getenv("http_proxy"));
+ _alpm_log(PM_LOG_DEBUG, "FTP_PROXY: %s\n", getenv("FTP_PROXY"));
+ _alpm_log(PM_LOG_DEBUG, "ftp_proxy: %s\n", getenv("ftp_proxy"));
+
/* libdownload does not reset the error code, reset it in
* the case of previous errors */
downloadLastErrCode = 0;