FS#11180 - TotalDownload percentage for first package in list reaches 100%
Attached to Project:
Pacman
Opened by kane (kane) - Monday, 11 August 2008, 12:24 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 20 August 2008, 00:57 GMT
Opened by kane (kane) - Monday, 11 August 2008, 12:24 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 20 August 2008, 00:57 GMT
|
Details
Summary and Info:
After enabling the TotalDownload option, the download percentage for the first package in a list of packages will go to 100% Example Output below: :: Retrieving packages from core... hdparm-8.9-1-i686 48.0K 75.4K/s 00:00:01 [#####################] 100% module-init-tools-3... 341.9K 70.9K/s 00:00:05 [#####################] 1% kernel26-2.6.26.2-1... 25.3M 114.9K/s 00:03:46 [#####################] 82% Steps to Reproduce: Enable TotalDownload in pacman.conf Download a list of packages, or perform system upgrade. Has been replicated intermittently here http://bbs.archlinux.org/viewtopic.php?id=53256 |
This task depends upon
Closed by Dan McGee (toofishes)
Wednesday, 20 August 2008, 00:57 GMT
Reason for closing: Fixed
Additional comments about closing: Commit 89c2c51964d5e4f297e767befb56a65c18dc3d6f
Wednesday, 20 August 2008, 00:57 GMT
Reason for closing: Fixed
Additional comments about closing: Commit 89c2c51964d5e4f297e767befb56a65c18dc3d6f
However, there might be a reason why the current code was like that. Is it possible that disp_percent could not be set correctly, staying at 0, even when totaldownload is enabled?
Maybe Dan was thinking about such a case, but I don't see when it could happen.
And anyway, we can't keep it like this as the current bug report shows :)
You know we can do it with a simple replacement though, right? :P
- /* use disp_percent if it is not 0, else show bar_percent */
- int p = disp_percent ? disp_percent : bar_percent;
+ /* show total download percent if option is enabled */
+ int p = config->totaldownload ? disp_percent : bar_percent;