+++ This bug was initially created as a clone of Bug #1727137 +++
Description of problem:
dnf download ignores destdir argument when fetching remote packages through a local repository
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a local repository using createrepo_c at /some/path
2. Merge a remote repository into it with mergerepo_c. Now you have a mix of some packages with just <location href="x86_64/foo-1.0.0-1.x86_64.rpm"> and some with <location xml:base="http://somewhere.else/" href="bar-2.0.0-2.x86_64.rpm">
3. dnf download --repofrompath="fred,file:///some/path" --repo fred --destdir /tmp foo bar
/some/path/x86_64/foo-1.0.0-1.x86_64.rpm is correctly copied to /tmp/foo-1.0.0-1.x86_64.rpm
http://somewhere.else/bar-2.0.0-2.x86_64.rpm is downloaded to /some/path/bar-2.0.0-2.x86_64.rpm
Both foo-1.0.0-1.x86_64.rpm and bar-2.0.0-2.x86_64.rpm should be copied to /tmp
I created a patch for DNF that should fix this: https://github.com/rpm-software-management/dnf/pull/1464
And here are tests for this: https://github.com/rpm-software-management/ci-dnf-stack/pull/589
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.