From 300076bc29a985294f2e693e6315617e1d76514a Mon Sep 17 00:00:00 2001 From: Tomas Hozza Date: Nov 18 2014 14:52:31 +0000 Subject: Fix the progress bar issue (#1159643) Signed-off-by: Tomas Hozza --- diff --git a/wget-1.16-fix_progress_bar.patch b/wget-1.16-fix_progress_bar.patch new file mode 100644 index 0000000..d9830fb --- /dev/null +++ b/wget-1.16-fix_progress_bar.patch @@ -0,0 +1,33 @@ +diff --git a/src/progress.c b/src/progress.c +index 5ba542d..1611599 100644 +--- a/src/progress.c ++++ b/src/progress.c +@@ -907,10 +907,6 @@ create_image (struct bar_progress *bp, double dl_total_time, bool done) + char *p = bp->buffer; + wgint size = bp->initial_length + bp->count; + +- const char *size_grouped = with_thousand_seps (size); +- int size_grouped_len = count_cols (size_grouped); +- /* Difference between num cols and num bytes: */ +- int size_grouped_diff = strlen (size_grouped) - size_grouped_len; + int size_grouped_pad; /* Used to pad the field width for size_grouped. */ + + struct bar_progress_hist *hist = &bp->hist; +@@ -969,7 +965,7 @@ create_image (struct bar_progress *bp, double dl_total_time, bool done) + int *cols_ret = &col; + + if (((orig_filename_cols > MAX_FILENAME_COLS) && !opt.noscroll) && !done) +- offset_cols = ((int) bp->tick) % (orig_filename_cols - MAX_FILENAME_COLS); ++ offset_cols = ((int) bp->tick) % (orig_filename_cols - MAX_FILENAME_COLS + 1); + else + offset_cols = 0; + offset_bytes = cols_to_bytes (bp->f_download, offset_cols, cols_ret); +@@ -1159,7 +1155,7 @@ create_image (struct bar_progress *bp, double dl_total_time, bool done) + move_to_end (p); + } + +- while (p - bp->buffer - bytes_cols_diff - size_grouped_diff < bp->width) ++ while (p - bp->buffer - bytes_cols_diff < bp->width) + *p++ = ' '; + *p = '\0'; + } diff --git a/wget.spec b/wget.spec index 581f78b..2ea2691 100644 --- a/wget.spec +++ b/wget.spec @@ -1,7 +1,7 @@ Summary: A utility for retrieving files using the HTTP or FTP protocols Name: wget Version: 1.16 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ Group: Applications/Internet Url: http://www.gnu.org/software/wget/ @@ -12,6 +12,7 @@ Patch2: wget-1.15-path.patch Patch3: wget-1.16-dont-run-failing-test.patch # sent to upstream mailing list Patch4: 0001-Fix-idn-cmd-utf8-and-idn-robots-utf8-tests-on-archit.patch +Patch5: wget-1.16-fix_progress_bar.patch Provides: webclient Provides: bundled(gnulib) @@ -39,6 +40,7 @@ support for Proxy servers, and configurability. # upstream is working on fix and will be fixed most probably in 1.16.1 %patch3 -p1 -b .test %patch4 -p1 -b .char +%patch5 -p1 -b .progress_bar %build if pkg-config openssl ; then @@ -78,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT %{_infodir}/* %changelog +* Tue Nov 18 2014 Tomas Hozza - 1.16-3 +- Fix the progress bar issue (#1159643) + * Mon Nov 03 2014 Jakub Čajka - 1.16-2 - fix failing tests idn-cmd-utf8 and idn-robots-utf8 - re-enabled tests