Description of problem: With yum distro-sync, a download error was not a condition to stop the download progress: yum tried to download as much as possible and would failed later. With dnf distro-sync, the first package in error stop the download of the other packages. Version-Release number of selected component (if applicable): Name : dnf Version : 1.0.0 Release : 1.fc22
Some logs: [MIRROR] xxxx.rpm: Status code: 404 for http://xxxx/mirrors/xxxx/xxxx/fedora/development/22/x86_64/os/xxxx.rpm [FAILED] xxxx.rpm: No more mirrors to try - All mirrors were already tried without success Erreur : Erreur de téléchargement des paquets Cannot download xxxx.rpm: All mirrors were tried
As noted in bug #1225221, it's a pain to test as dnf distro-sync always re-download the same packages for each invocation.
I agree that distro-sync should not clean the cache in case of an error but I don't think that it should continue with the download. There is some chance that a newer version of the downloaded package appears in the repository in the meantime and thus the previous download could be unneeded. DNF would just waste your resources in such case.
I have what I consider a bug related to this. I am doing a dnf-3 upgrade in rawhide to move from f21 to f23. When dnf hits a package it can't find on the repos, OR when it finds the package and the checksum differs (how can this happen with signed packages?), it stops. Until I turned on keepcache in the dnf.conf file, it would then discard all of the packages downloaded up to that point. I think it should instead be caching packages from incomplete transactions. I have been removing the failing packages when this happens, in order to keep going. But for some reason kernel-headers are not available in rawhide, and removing them would take too many packages. So, I can no longer run a dnf-3 upgrade command. Dead in my tracks. I think that all downloads should continue, being cached, until there are no more. *Then*, the error that the package could not be found, or no package with a valid checksum could be found, should be printed for all failing packages. And the transaction aborted. Of course, I can work around this by using wget or curl with the list of packages from dnf-3 list upgrades > upgrades. Putting the pulled packages in /var/cache/dnf/etc. For that matter, I can run the upgrade transaction using this same technique, removing packages that cause problems for the upgrade. Anyway, now you're aware of this. I'll use a workaround.
After thinking about this, it seems that using keepcache is the answer. Then, after all the dust has cleared, I can just run dnf-3 clean packages , and be pristine again. And running dnf-3 as a batch job, telling it to only upgrade the packages that I requested also worked. There were some other problems, which I will be opening bugzillas for, but I think I can live with this behavior, now that I know about it.
stan your talking about bug 1220074. Stopping after first error is the DNF feature. The redownloading of packages when transaction / downloads fails will be fixed by bug 1220074.
Thanks for the heads up.