pacman/lib/libalpm
Martin Kühne e83e868a77 Parametrise the different ways in which the payload is reset
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.

Signed-off-by: Martin Kühne <mysatyre@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-12-05 15:20:08 +10:00
..
po Regenerate translations for 5.0.1 2016-02-23 13:09:39 +10:00
.gitignore libalpm: add pkg-config file 2012-04-25 20:02:36 -04:00
add.c Release resources on error paths. 2016-08-30 18:10:40 +10:00
add.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
alpm.c Represent bitfields as ints, not enums 2016-10-22 20:50:55 +10:00
alpm.h Represent bitfields as ints, not enums 2016-10-22 20:50:55 +10:00
alpm_list.c add alpm_list_append 2016-01-15 14:47:36 +10:00
alpm_list.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
backup.c Release resources on error paths. 2016-08-30 18:10:40 +10:00
backup.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
base64.c base64.c: comment out unused variable 2014-01-15 15:54:56 +10:00
base64.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
be_local.c Represent bitfields as ints, not enums 2016-10-22 20:50:55 +10:00
be_package.c Represent bitfields as ints, not enums 2016-10-22 20:50:55 +10:00
be_sync.c Represent bitfields as ints, not enums 2016-10-22 20:50:55 +10:00
conflict.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
conflict.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
db.c Represent bitfields as ints, not enums 2016-10-22 20:50:55 +10:00
db.h Represent bitfields as ints, not enums 2016-10-22 20:50:55 +10:00
delta.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
delta.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
deps.c recursedeps: include cyclic dependencies 2016-08-30 18:10:40 +10:00
deps.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
diskspace.c Use f_bavail for diskspace calculations 2016-10-12 19:48:29 +10:00
diskspace.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
dload.c Parametrise the different ways in which the payload is reset 2016-12-05 15:20:08 +10:00
dload.h Parametrise the different ways in which the payload is reset 2016-12-05 15:20:08 +10:00
error.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
filelist.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
filelist.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
graph.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
graph.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
group.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
group.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
handle.c Represent bitfields as ints, not enums 2016-10-22 20:50:55 +10:00
handle.h Represent bitfields as ints, not enums 2016-10-22 20:50:55 +10:00
hook.c hook.c: replace fstatat with stat 2016-08-30 18:10:40 +10:00
hook.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
ini.c run hooks during trans_commit 2015-10-18 10:59:23 +10:00
ini.h run hooks during trans_commit 2015-10-18 10:59:23 +10:00
libalpm.pc.in Allow replacing libcrypto with libnettle in pacman 2016-10-22 20:50:55 +10:00
libarchive-compat.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
log.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
log.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
Makefile.am Allow replacing libcrypto with libnettle in pacman 2016-10-22 20:50:55 +10:00
package.c Represent bitfields as ints, not enums 2016-10-22 20:50:55 +10:00
package.h Represent bitfields as ints, not enums 2016-10-22 20:50:55 +10:00
pkghash.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00
pkghash.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
rawstr.c Remove ts and sw from vim modeline when noet is set 2014-01-28 20:19:25 +10:00
remove.c Fix memory leak in remove_notify_needed_optdepends 2016-09-03 20:38:13 +10:00
remove.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
signing.c libalpm/signing: support EDDSA from gpgme 1.7.0 2016-12-05 15:20:08 +10:00
signing.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
sync.c Parametrise the different ways in which the payload is reset 2016-12-05 15:20:08 +10:00
sync.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
trans.c Represent bitfields as ints, not enums 2016-10-22 20:50:55 +10:00
trans.h Represent bitfields as ints, not enums 2016-10-22 20:50:55 +10:00
util-common.c Split common utility functions for libalpm and pacman 2013-01-04 21:49:37 +10:00
util-common.h Split common utility functions for libalpm and pacman 2013-01-04 21:49:37 +10:00
util.c Allow replacing libcrypto with libnettle in pacman 2016-10-22 20:50:55 +10:00
util.h Represent bitfields as ints, not enums 2016-10-22 20:50:55 +10:00
version.c Update copyright years for 2016 2016-01-04 13:27:08 +10:00