Created attachment 1273551 [details] simple patch as proof of concept of possible solution for the current python3 version Description of problem: yum used to allow formatting with -qf with the --tree-whatrequires option. dnf ignores --qf with --tree. dnf hardcodes the output format of --tree. It would be great if dnf could use qf like yum did when using --tree. I have gotten this to work with a tiny patch (attached) to: /usr/lib/python3.5/site-packages/dnf-plugins/repoquery.py The fact this feature already wasn't in there seems like just an oversight. The python2 version is pretty much identical, let me know if I should provide a patch for that also. It's been a while since I submitted patches, let me know if I'm formatting them wrong. Version-Release number of selected component (if applicable): python3-dnf-plugins-core-0.1.21-3.fc24.noarch How reproducible: always Steps to Reproduce: 1. dnf repoquery --whatrequires gtk2 --installed --arch=$MACHTYPE,noarch --tree --queryformat '%{name}' --resolve Actual results: gimp-2:2.8.20-1.fc24.x86_64 \_ xsane-gimp-0.999-20.fc24.x86_64 [47: ...] gtk2-devel-2.24.31-1.fc24.x86_64 gtk2-immodule-xim-2.24.31-1.fc24.x86_64 Expected results: gimp \_ xsane-gimp [47: ...] gtk2-devel gtk2-immodule-xim Additional info: I need the name-only format for a script I wrote to work with yum, and it's not possible to just regex derive name from NERV because the dash-number boundary can be ambiguous.
I created pull-request that should solve the problem (https://github.com/rpm-software-management/dnf/pull/819).
dnf-plugins-core-2.1.1-1.fc26 libdnf-0.9.1-1.fc26 dnf-2.5.1-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c87c47dccb
dnf-2.5.1-1.fc26, dnf-plugins-core-2.1.1-1.fc26, libdnf-0.9.1-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-c87c47dccb
dnf-2.5.1-1.fc26 dnf-plugins-core-2.1.1-1.fc26 dnfdaemon-0.3.18-3.fc26 libdnf-0.9.1-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c87c47dccb
dnf-2.5.1-1.fc26, dnf-plugins-core-2.1.1-1.fc26, dnfdaemon-0.3.18-3.fc26, libdnf-0.9.1-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-c87c47dccb
dnf-2.5.1-1.fc26, dnf-plugins-core-2.1.1-1.fc26, dnfdaemon-0.3.18-3.fc26, libdnf-0.9.1-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.