History log of /haiku/src/kits/package/FetchUtils.cpp
Revision Date Author Comments
# 3d34a937 23-Nov-2021 Augustin Cavalier <waddlesplash@gmail.com>

Package Kit: Build FetchUtils outside HAIKU_TARGET_PLATFORM_HAIKU.


# 2be10edf 23-Nov-2021 Augustin Cavalier <waddlesplash@gmail.com>

Package Kit: Improvements to partial download handling.

* Move IsDownloadComplete call into DownloadFileRequest; this way
we will always revalidate checksums even if the file is fully
downloaded instead of skipping that.

* Treat ERANGE as a "bad data" error in PackageManager (it usually means
we have a size mismatch between the local and the server's file)

* If we fail checksum validation or get ERANGE, and we reused a download,
immediately try again without reusing the download. This fixes most
problems that previously required you to delete old transaction
directories.

Change-Id: Ia3079655691b871e0b206e366b59fca0f832c63d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4730
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# f15516ff 19-Nov-2020 Adrien Destugues <pulkomandy@pulkomandy.tk>

Package Kit: re-use downloads from unfinished transactions

There are three parts to this change:
- In FetchFileJob, if the request fails with a timeout or IO error
(probably because of unstable connection) attempt to resume the
download with a range request. No limit on number of retries
currently, maybe we should add one.
- In PackageManager, before downloading a file, look around in other
transaction directories in case it's already there. Partial and
complete downloads are differentiated by an attribute which the
fetch file job maintains. For complete downloads, no fetch job is
scheduled, for partial downloads, the fetch job will request the
remainder of the file.
- In BHttpRequest, the implementation of SetRangeStart() and
SetRangeEnd() have been added, along with some refactoring to
handle listener notifications consistently. This also fixed a
bug where the final notification for download progress was not
emitted for compressed data.

Fixes #12414.

Change-Id: I3e285741ed0e5651594a7c2e1c7170644a9d297d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3404
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>