Bug 1020 - Can't query "which uninstalled package supplies file XXXX?"
Can't query "which uninstalled package supplies file XXXX?"
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 1999-02-01 18:09 EST by perry_hutchison
Modified: 2009-04-15 01:05 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-05-16 17:32:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description perry_hutchison 1999-02-01 18:09:02 EST
I have not been able to find a way of asking RPM to search
through a collection of _uninstalled_ rpm files, and report
which (if any) of them contains a particular file.  The
closest I have gotten is

  cd /mnt/cdrom/RedHat/RPMS
  rpm -q -p *.rpm -l | egrep {pattern}

which will dump all file names from the entire distribution
and show those that match the {pattern}, but it doesn't
show which rpm I would need to install to get the selected

I had first tried

  rpm -q -p *.rpm -f {name}

but this complains:

  rpm: one type of query/verify may be performed at a time

I have now run into a need for this sort of query twice,
most recently to find out which source rpm contains
loadlin.  I think the answer may be that the distribution
does not provide the loadlin source code :( which is not
good because there appears to be a bug in it :(((
Comment 1 Jeff Johnson 1999-02-11 13:30:59 EST
	rpm -qp --queryformat '[%{=NAME}: %{FILENAMES}\n]' *.rpm
| 	           grep ...
(from "Maximum RPM" pg 73).
Comment 2 perry_hutchison 1999-02-11 15:15:59 EST
That's a pretty slick capability -- maybe it could be added to the
manpage?  I just looked at the 19 August 1997 version as displayed
by "info rpm", and if it's there I couldn't find it, nor any mention
at all of using "[" in --queryformat.
Comment 3 Jeff Johnson 1999-03-22 15:07:59 EST
The man pages for rpm will be reworked in the next month or so.
Comment 4 Jeff Johnson 1999-05-16 17:32:59 EDT
Man pages are reworked. The use of the iterator is best found
by reading Maximum RPM. A new version is due out in the next couple
of months.

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