Alternative to dnf that restarts downloads without discarding?
FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Fedora 36; Homebrew desktop with Ryzen 5600G and 32Gb. Using Red Hat since 1998
Posts: 304
Rep:
Alternative to dnf that restarts downloads without discarding?
I have recently moved from high speed broadband in Australia to the end of a very unreliable and slow internet link in regional Philippines. Now, dnf struggles to download during the day and often drops hundreds of megabytes of download in an update session when retries are exceeded. This is chewing up my limited Gb allowance. Is there an alternative method of download which will continue a half finished action? If I can't do it in Fedora, which I have used since the late 90s, is there another distro with a better downloader that I can switch to? Tearing my hair out.
By the way, dnf is the only download process across my laptop and two android devices which throws away precious downloads. Updates to Android work fine and even good old YouTube knows how to continue after an interruption, so it is not as though the technology is not well proven.
Any help would be greatly appreciated, as I am ready to upgrade to Fedora 32 and I'm not willing to risk it until this issue is sorted. "8-)
Well I live at the end of a dodgy NBN link, and I've never had Fedora chuck incomplete downloads away. But I do the updates from a terminal and have the check turned off. Don't use --refresh unless you really have to - although that should only refresh the package list, which is maybe what you are seeing fail.
Also make sure you are using a local mirror for the repos.
Distribution: Fedora 36; Homebrew desktop with Ryzen 5600G and 32Gb. Using Red Hat since 1998
Posts: 304
Original Poster
Rep:
Quote:
Originally Posted by syg00
Well I live at the end of a dodgy NBN link, and I've never had Fedora chuck incomplete downloads away. But I do the updates from a terminal and have the check turned off. Don't use --refresh unless you really have to - although that should only refresh the package list, which is maybe what you are seeing fail.
Also make sure you are using a local mirror for the repos.
Thanks syg00.
I have only experienced these failures here, not in Oz. The link is sooooo slooooow that downloads time out, even with the threshold set way down to 1Kb per minute and given a timeout of three minutes. When this happens, dnf discards whatever it has already downloaded and starts afresh at the next mirror it can find. I have no idea if there is the concept of a local mirror here - probably some of the bigger universities do, but whether they make them public ...?
My internet service comes via wireless to the modem from a local tower, which I believe is merely a repeater from the nearest bigger town anyway, so reliability and speed are woeful at the best of times. Now the population is locked down at home, everybody is trying to stream video ... sigh!
The key to the problem is dnf throwing away what it has partly downloaded. Research to date indicates this is a 'feature' of the way dnf does business. Obviously this is a bad choice and I need to change horses if I am to get updates to complete. Currently it can take two days to successfully download an update including kernel, Libre Office, glib and a few other biggies. During these two days, I generally have to restart the update numerous times after timeouts have caused all mirrors to be tried on major packages and this is where my Gb allowance is disappearing.
OK, for completeness I tried a test on an old (slow) laptop. Hasn't been updated in a while and it found 1.3G of updates (for F30). I powered off the broadband modem while it was syncing the repos - restarted fine after it all came back up. I used --refresh (as I had to) so it restarted in full. Then after a few packages I killed the wifi whilst the kernel was downloading. Waited for all the error messages, then retried (without wifi) and it whinged about unable to find the repos. Restarted wifi, restarted dnf update, and as expected it listed all the previously downloaded packages as just that, and skipped the re-download. Then resumed (not restarted) the kernel.
As I said, check your mirrors to ensure they are local to you, rather than coming via rusty copper under the ocean.
Distribution: Fedora 36; Homebrew desktop with Ryzen 5600G and 32Gb. Using Red Hat since 1998
Posts: 304
Original Poster
Rep:
Quote:
Originally Posted by syg00
Then resumed (not restarted) the kernel.
Thanks for your efforts, but we are not comparing apples with apples.
I have no way of knowing how local the mirror is, but that is not the issue - it is the intervening communication technology that is not up to the job.
I can assure you, what I originally wrote is indeed happening. During a dnf update session, all files successfully downloaded in a previous session are skipped, but any partials are thrown away and restarted from the beginning.
After a mirror is abandoned for lack adequate speed, the currently downloaded file fragment is discarded. This can be proved by looking at the download statistics on the last line of the dnf output: for example, when a kernel is being downloaded as part of an update, I might get to say 400Mb download reported, then the file fragment is discarded, the download total drops back to say 300Mb and the next mirror is tried.
Whatever causes this, the partial download is thrown away and this wastes precious time, money and allocation. It is a known issue with dnf, as I have searched on this previously. The question is how to update without using this broken system. If Fedora can only use dnf, I will have to try to find a distro that does NOT discard partial downloads during update.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.