Description of problem: When upgrading from Fedora 24 to Fedora 25 recently, I encountered the following error when performing the "sudo dnf system-upgrade download --refresh --releasever=25" command. After 1+ GB of packages downloaded, I got the following error: Curl error (37): Couldn't read a file:/// file for file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-25-x86_64 [Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-25-x86_64] DNF should provide a better error message to the user. This error was only moderately helpful. DNF should suggest that the user update "fedora-repos" package before running the system-upgrade command. After updating fedora-repos to 24-6, I was able to successfully upgrade to F25. Version-Release number of selected component (if applicable): fedora-repos-24-1 Steps to Reproduce: 1. Install Fedora 24 with the older fedora-repos package. 2. Run "sudo dnf system-upgrade download --refresh --releasever=25" Actual results: Curl error is displayed and dnf command fails. Expected results: DNF should suggest possible workarounds to the user or offer to update the fedora-repos package automatically. Additional info: Obviously, I skipped the previous step of "sudo dnf upgrade --refresh" which resulted in the Fedora 25 RPM-GPG-KEY not installed on the system. I skipped this step because I didn't want to download 800 MB of updates to F24 just to then download another 1 GB of updates for F25. My system was mostly updated anyway so I figured it was ok to go straight to F25. Other users may make a similar calculation and so we should provide a better error message.
Hello, you should always update your system before system-upgrade. Please see https://fedoraproject.org/wiki/DNF_system_upgrade for how to use the system-upgrade.