Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1020 - Can't query "which uninstalled package supplies file XXXX?"
Summary: Can't query "which uninstalled package supplies file XXXX?"
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 5.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-02-01 23:09 UTC by perry_hutchison
Modified: 2009-04-15 05:05 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-05-16 21:32:08 UTC

Attachments (Terms of Use)

Description perry_hutchison 1999-02-01 23:09:02 UTC
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 18:30:59 UTC
	rpm -qp --queryformat '[%{=NAME}: %{FILENAMES}\n]' *.rpm
| 	           grep ...
(from "Maximum RPM" pg 73).

Comment 2 perry_hutchison 1999-02-11 20:15:59 UTC
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 20:07:59 UTC
The man pages for rpm will be reworked in the next month or so.

Comment 4 Jeff Johnson 1999-05-16 21:32:59 UTC
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.