Bug 76185

Summary: query keyed on a package's Source RPM
Product: [Retired] Red Hat Linux Reporter: Gene Czarcinski <gczarcinski>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: mitr
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-10-18 13:43:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gene Czarcinski 2002-10-17 22:03:36 UTC
Description of Problem:

Implement a capability to list all installed rpms based on the Source RPM that
the binary rpm was created from.

While the installed packages would be my first priority, it would also be nice
if it could also do uninstalled packages.

I realize that I can get this with: rpm -qa |less and then searching manually
for the Source RPM but ... it would be nice if rpm could do this.

Comment 1 Miloslav Trmac 2002-10-18 12:28:17 UTC
Isn't this enough?
rpm -qa --qf '%{sourcerpm}\t%{name}\n'

Comment 2 Gene Czarcinski 2002-10-18 13:43:44 UTC
This helps but not much .. I still need to use less:

rpm -qa --qf '%{sourcerpm}\t%{name}\n' | less

and then search of kdenetwork to find all binary packages installed which have
kdenetwork as their source package.  What I am looking for is something like:

rpm -qa --sourcepkg kdenetwork

which would list all binary packages which have kdenetwork as their source package.

I suspect that if I look into db4 capabilities, I could find a way to do this
query myself.  However, I really do not want to muck with the rpm database
directly myself ... too easy to really screw things up.



Comment 3 Gene Czarcinski 2002-10-18 13:46:41 UTC
I am closing this as "WORKSFORME" since I just realize that I can use the
command you specified along with grep to get exactly what I want ... no need to
make more work for you.

Comment 4 Jeff Johnson 2002-10-18 13:48:25 UTC
rpm -qa --qf '%{sourcerpm}\t%{name}\n' | grep "some.src.rpm"

solves your problem fo now. All the above can be done
as a popt alias as well.