Bug 51650 - Add -A/--apropos query option to RPM.
Add -A/--apropos query option to RPM.
Status: CLOSED DEFERRED
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-08-13 11:49 EDT by Ed Halley
Modified: 2007-04-18 12:35 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-08-13 11:49:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ed Halley 2001-08-13 11:49:19 EDT
Description of Problem:

Would very much appreciate an "apropos" query option to the command line
for rpm.  If I don't know the exact package name, finding it without
sorting through all packages can be a pain.

Adding a command line option to help find the right package would be very
useful.  I propose the -A/--apropos query option, to take a search term
that will be searched against all known packages.

Without --apropos:

   "Hm, where is samba?"
   % rpm -q samba
   package samba not installed
   % rpm -q --whatprovides samba
   no package provides samba
   % rpm -q --file samba
   error: file samba: file not found
   % rpm -q -a | grep samba
   samba-client-2.0.10-2
   samba-common-2.0.10-2

   "Hm, which package provides smbmount?"
   % rpm -q --whatprovides smbmount
   no package provides smbmount
   % rpm -q --file smbmount
   error: file smbmount: file not found
   % which smbmount
   /usr/bin/smbmount
   % rpm -q --file /usr/bin/smbmount
   samba-client-2.0.10-2

With --apropos:

   % rpm -qA samba
   samba-client-2.0.10-2
   samba-common-2.0.10-2

   % rpm -qA smbmount
   samba-client-2.0.10-2

Additional Information:

The simplest form would be to just make it work like "rpm -q -a | grep %1",
but that would only help if the word you're looking for was a part of the
package name.  I suggest that --apropos match against the package names,
the provides (and virtual provides), and the filename lists, and returns
the matched package names, as shown in the examples above.

[Got suggestion from irc.linux.org #redhat that Jeff Johnson may be a
suitable party for this idea.]
Comment 1 Jeff Johnson 2001-08-13 13:04:19 EDT
The idea is sound, but parameterizing the locations where
information might be gleaned is lots trickier than
searching, say, MANPATH. Deferred for further thought.

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