Bug 1337459 - RFE: add base_package_name querytag
Summary: RFE: add base_package_name querytag
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-19 09:15 UTC by Michael Simacek
Modified: 2017-06-14 14:49 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-14 14:49:07 UTC
Type: Bug


Attachments (Terms of Use)

Description Michael Simacek 2016-05-19 09:15:41 UTC
Description of problem:
repoquery from yum-utils has base_package_name querytag, which can be used to get the source package name. dnf repoquery doesn't have any equivalent. The closes querytag is sourcerpm, but that spits out whole filename, requiring me to parse the name from it. It would be great if dnf also had it - for convenience and for backwards compatibility with yum.

Comment 1 Honza Silhan 2016-05-23 13:38:04 UTC
Isn't `dnf repoquery -C sqlite --srpm --qf "%{name}"` what you want?

Comment 2 Michael Simacek 2016-05-23 13:43:13 UTC
It is, I didn't know about that one. Thank you!

Comment 3 Igor Gnatenko 2017-01-13 13:34:28 UTC
--srpm works with source rpms, while --source works with binary rpms and point is to query binary rpms, but get name of srpm used.

Comment 4 Jaroslav Rohel 2017-05-23 13:44:10 UTC
You can use querytag source_name.

DNF has querytag "source_name" with the same meaning as "base_package_name" in yum.

This PR adds this tag to the help message: https://github.com/rpm-software-management/dnf/pull/823

Comment 5 Jaroslav Mracek 2017-06-14 14:49:07 UTC
The patch was released in dnf-2.5.1-1 into rawhide and Fc26.


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