If I Ctrl+c dnf while it's downloading a package (say because I want to pause the download to use the internet connection to do other things), dnf should attempt to continue the download from where it left off if I run dnf install/update again, rather than redownloading from 0.
thanks! A reasonable proposal though no priority at the moment. we'll keep it in the backlog.
This has to be implemented in librepo. Contrary to Yum, DNF does not stat/chksum already existing local .rpm files, so it should be transparent. Librepo should send a Range: header, and if the server returns partial response, append it to the existing partial file.
Created attachment 851011 [details] Reproducer Hi, librepo already support this feature for some time. Check the attached reproducer. All you need is to set a "resume" option to True.
Hmm, we set "resume=True" already.. > target = librepo.PackageTarget( > po.location, self.pkgdir, ctype_code, csum, po.size, po.baseurl, True, ^^^^ def __init__(self, relative_url, dest=None, checksum_type=CHECKSUM_UNKNOWN, checksum=None, expectedsize=0, base_url=None, resume=False, progresscb=None, cbdata=None, handle=None, endcb=None, mirrorfailurecb=None):
So it should work. Maybe the bug is related to the fact that even when the download is resumed, the progress bar starts at 0 (shows the progress of the remaining part). So it can look like the download starts from the scratch again.
Checked that the current DNF indeed resumes downloads.. However, the way librepo reports "resuming" is different from Yum. When Yum resumes a 1.0 MB download and 0.9 MB were already downloaded, the progress bar starts at 90% and the download size is reported as 1.0 MB (downloading only 100k) OTOH, librepo starts at 0%, but downloads just 0.1 MB anyway. Probably, this has to be changed in librepo, since then when all files are correctly downloaded, the total download progress is less than 100%. Tomas, can we send the correct "downloaded" and "total" values to the progress callback? The fact that we're resuming a file should be transparent to the upper layers, eg. the total size should not change at all.
This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.