Bug 1337459

Summary: RFE: add base_package_name querytag
Product: [Fedora] Fedora Reporter: Michael Simacek <msimacek>
Component: dnfAssignee: rpm-software-management
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: medium    
Version: rawhideCC: jmracek, jrohel, mluscon, msimacek, packaging-team-maint, pnemade, RadekHolyPublic, rpm-software-management, vmukhame
Target Milestone: ---Keywords: EasyFix, Reopened, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-14 14:49:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.