Description of problem:
dnf download is broken if the repository is file:///
$ grep baseurl yum.conf
$ ls repo/systemd-*
$ dnf download -c yum.conf --destdir tmp systemd
Last metadata expiration check: 0:08:42 ago on Sat 29 Jul 2017 10:33:42 BST.
$ ls tmp
This worked in dnf 2.5 but broke in dnf 2.6.2.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Set up a local repo containing some RPMs.
2. Create a yum.conf file pointing to the local repo.
3. Try to dnf download the RPMs.
I couldn't work out how to run dnf from the build directory, otherwise
I'd try to bisect this for you.
The instructions in the README don't appear to work:
$ PYTHONPATH=/home/rjones/d/dnf /home/rjones/d/dnf/bin/dnf-2 download -c yum.conf --destdir tmp systemd
No such command: download. Please use /home/rjones/d/dnf/bin/dnf-2 --help
It could be a DNF plugin command, try: "dnf install 'dnf-command(download)'"
And I couldn't build dnf for python 3 at all because of weird
cmake errors, even though I have all the dependencies installed:
$ rpm -qf /usr/bin/python3
$ cmake .. '-DPYTHON_DESIRED="3"'
-- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least version "3.0")
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find PythonInterp: Found unsuitable version "2.7.13", but
required is at least "3.0" (found /usr/bin/python)
Call Stack (most recent call first):
-- Configuring incomplete, errors occurred!
See also "/home/rjones/d/dnf/build/CMakeFiles/CMakeOutput.log".
I reverted d1f583570f2c8f39be1ca3966d54c4e89b8bde63 in dnf-plugins-core
and that fixes the problem.
It's not quite a straightforward reversion because I had to keep the
removal of the ‘--destdir’ parameter from the plugin otherwise both
core dnf and the plugin define this parameter which causes a problem
for Python argparse. Anyway after reverting the remainder of the
commit it fixed the problem, so I think this commit is to blame.
I created a patch (https://github.com/rpm-software-management/dnf/pull/879) that should solve the problem. But I am still confused with problem with --destdir option. We removed --destdir from plugin download, therefore there should be no conflict at all. DNF-plugins-core requires pythonX-dnf >= 2.6.1 and in case of dnf there is conflict with older conflict dnf-plugins-core < 2.1.3 . Anyway I hope that with the patch it is ok.
Yes these patches work.
Nice to hear it :-) .
I tested dnf-2.6.2-3.fc27 which contains the patch and it looks
like it fixes it. Thanks for that. Can we close this bug now?
The bug will be closed at the time of release (I will make the release on next Monday). Thanks for testing.
dnf-2.6.3-1.fc26 dnf-plugins-extras-2.0.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4813633f96
dnf-2.6.3-1.fc26, dnf-plugins-extras-2.0.2-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4813633f96
dnf-2.6.3-1.fc26, dnf-plugins-extras-2.0.2-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.