Bug 76185 - query keyed on a package's Source RPM
query keyed on a package's Source RPM
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-17 18:03 EDT by Gene Czarcinski
Modified: 2008-05-01 11:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-10-18 09:43:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gene Czarcinski 2002-10-17 18:03:36 EDT
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 08:28:17 EDT
Isn't this enough?
rpm -qa --qf '%{sourcerpm}\t%{name}\n'
Comment 2 Gene Czarcinski 2002-10-18 09:43:44 EDT
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 09:46:41 EDT
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 09:48:25 EDT
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.

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