dnf icon indicating copy to clipboard operation
dnf copied to clipboard

[Feature]: Resume downloads

Open radiumatic opened this issue 1 year ago • 2 comments

Hi, Currently, if dnf or the connection is interrupted, dnf starts the download over. This is specially problematic in unstable networks. You don't want to restart a 200MB download with a very slow connection.

Curl definitely supports resuming downloads. If compatibility is the concern, the accept-ranges header can be checked to ensure the mirror webserver supports this feature. Adding an option to only download from mirrors that support it would also be great.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests#checking_if_a_server_supports_partial_requests

Assuming that every mirror serves the same binary, it wouldn't cause any problem when switching mirrors.

Please consider this issue with dnf5 as well.

radiumatic avatar Feb 15 '24 12:02 radiumatic

Hi, I believe this is a duplicate of the librepo issue, which you can find here: https://github.com/rpm-software-management/librepo/issues/293. Since both dnf4 and dnf5 use librepo as the backend, it's a common issue.

jan-kolarik avatar Feb 15 '24 12:02 jan-kolarik

Hi, I believe this is a duplicate of the librepo issue, which you can find here: rpm-software-management/librepo#293. Since both dnf4 and dnf5 use librepo as the backend, it's a common issue.

It seems to be the case, however, the file gets removed also when the connection is interrupted or "suddenly closed". I didn't find any mention of this in that issue.

radiumatic avatar Feb 15 '24 13:02 radiumatic

Hi, I believe this is a duplicate of the librepo issue, which you can find here: rpm-software-management/librepo#293. Since both dnf4 and dnf5 use librepo as the backend, it's a common issue.

It seems to be the case, however, the file gets removed also when the connection is interrupted or "suddenly closed". I didn't find any mention of this in that issue.

Thanks, I've linked this use case in that issue. I'll close this one now.

jan-kolarik avatar Mar 11 '24 10:03 jan-kolarik