[pacman-dev] [PATCH v3] Parametrise the different ways in which the payload is reset

Allan McRae allan at archlinux.org
Fri Dec 2 05:25:43 UTC 2016


On 18/10/16 00:40, Martin Kühne wrote:
> In FS#43434, Downloads which fail and are restarted on a different server
> will resume and may display a negative download speed. The payload's progress
> in libalpm was not properly reset which ultimately caused terminal noise
> because the line width calculation assumes positive download speeds.
> 
> This patch fixes the incomplete reset of the payload by mimicing what
> be_sync.c:alpm_db_update() does over in sync.c:download_single_file().
> The new dload.c:_alpm_dload_payload_reset_for_retry() extends beyond the
> current behavior by updating initial_size and prevprogress for this case.
> This makes pacman reset the progress properly in the next invocation of the
> callback and display positive download speeds.
> 
> Fixes FS#43434.

Thanks,
A


More information about the pacman-dev mailing list