Examples: # dnf download --urls firefox > Last metadata expiration check: [...] > Error: Failed to get mirror for package: firefox # dnf download --debuginfo --urls firefox > enabling rawhide-debuginfo repository > Last metadata expiration check: [...] > Error: Failed to get mirror for package: firefox-debuginfo Without --url[s] option, it does the job just fine, so hopefully an easyfix. # rpm -q --whatprovides 'dnf-command(download)' dnf librepo libdnf > dnf-plugins-core-4.0.0-4gb1f33da.fc30.noarch > dnf-4.0.4-2.fc30.noarch > librepo-1.9.2-1.fc30.x86_64 > libdnf-0.22.0-8.fc30.x86_64
I created two patches (https://github.com/rpm-software-management/libdnf/pull/625 and https://github.com/rpm-software-management/dnf/pull/1249) that should solve the issue. *** This bug has been marked as a duplicate of bug 1649284 ***
Just updated to {python3-,}dnf-4.0.8-0.26gb9a915f0.fc30.noarch (b9a915f0 > 3d40275c) and {python3-,}dnf-plugins-core-4.0.2-0.21gbd00656.fc30.noarch and the problem persists. Also, there's a strange discrepancy: $ dnf --version > 4.0.5 ^^^^^ > Installed: dnf-0:4.0.8-0.26gb9a915f0.fc30.noarch at Wed 21 Nov 2018 05:53:19 PM GMT ^^^^^ > Built : at Tue 20 Nov 2018 02:26:14 AM GMT > > Installed: rpm-0:4.14.2.1-2.fc30.x86_64 at Fri 26 Oct 2018 08:37:58 AM GMT > Built : Fedora Project at Wed 24 Oct 2018 02:26:45 PM GMT though that may be a fallout from building nightlies.
I am sorry, but I am not able to reproduce it. Please can you provide information about available repos on your system? Or probably find a reproducer with only one repository? Thanks a lot.
On a closer look, the problem was perhaps with stale or generally pre-fix tainted metadata? After "dnf clean all" and subsequent refetch of metadata, it started to work. If that's indeed the case (I don't know), shouldn't there be an update mechanism devised (e.g. touching a dedicated persistent file) that would force a subsequent cached metadata invalidation upon the next used of dnf and force that whenever the new dnf build is known to require that? We can close this bug regardless.
Indeed, I suspect it was because of "tainted metadata". I downgraded back to {python3-,}dnf-4.0.4-2.fc30.noarch and {python3-,}dnf-plugins-core-4.0.0-2.fc30.noarch. Then immediately run: # dnf download --urls --urlprotocols https firefox > https://mirrors.nic.cz/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/f/firefox-63.0.3-1.fc30.x86_64.rpm # dnf clean all > 12 files removed # dnf download --urls --urlprotocols https firefox > Copr repo for dnf-nightly owned by rpmsoftwaremanagement [...] 200 kB [...] > Fedora - Rawhide - Developmental packages for the next Fe [...] 63 MB [...] > Error: Failed to get mirror for package: firefox Regarding the invalidation mechanism, something like generating said dedicated files in %post and %postun (two files to be able to tell old and new dnf version), then having dnf do some extra evaluations whether the cache invalidation (an which parts perhaps) is needed upon it's first subsequent run incl. removal of those files? If the problem is not completely elsewhere, of course, but if not we can repurpose this bug along those lines.
*** This bug has been marked as a duplicate of bug 1649284 ***