Bug 1444751 - dnf repoquery allow --qf use with --tree
Summary: dnf repoquery allow --qf use with --tree
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: 24
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Patch, Triaged
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-24 08:10 UTC by Trevor Cordes
Modified: 2017-06-16 13:18 UTC (History)
5 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2017-06-16 13:18:34 UTC


Attachments (Terms of Use)
simple patch as proof of concept of possible solution for the current python3 version (1.36 KB, patch)
2017-04-24 08:10 UTC, Trevor Cordes
no flags Details | Diff

Description Trevor Cordes 2017-04-24 08:10:49 UTC
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.

Comment 1 Jaroslav Mracek 2017-05-19 11:40:47 UTC
I created pull-request that should solve the problem (https://github.com/rpm-software-management/dnf/pull/819).

Comment 2 Fedora Update System 2017-06-12 15:29:35 UTC
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

Comment 3 Fedora Update System 2017-06-14 01:35:35 UTC
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

Comment 4 Fedora Update System 2017-06-14 05:33:27 UTC
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

Comment 5 Fedora Update System 2017-06-15 13:55:44 UTC
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

Comment 6 Fedora Update System 2017-06-16 13:18:34 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.