Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2008-08-20 23:17:02 +0200
committerDan McGee <dan@archlinux.org>2008-08-23 08:38:51 -0500
commite760c4f4784c7e7b59717cd10c56dac04f175b73 (patch)
treee8a19e46ca2d74de320f28bb4fd98645f6cdc3c3
parent081f64aea3aa7df13f1ccd1da601075abab6b1ba (diff)
download : disable progressbar when total is unknown.
This is a work around for FS#8725. There are some bad combination of proxies and mirrors where the Content Length is not returned, and thus the progress bar can't be displayed correctly. Dan: Note that this patch also adds a "downloading" message when the progress bar is disabled, which was formerly not indicated at all in the output. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--src/pacman/callback.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 8d4538c4..a6349874 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -444,7 +444,10 @@ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total)
int file_percent = 0, total_percent = 0;
char rate_size = 'K', xfered_size = 'K';
- if(config->noprogressbar) {
+ if(config->noprogressbar || file_total == -1) {
+ if(file_xfered == 0) {
+ printf(_("downloading %s...\n"), filename);
+ }
return;
}