Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1020 - Can't query "which uninstalled package supplies file XXXX?"
Summary: Can't query "which uninstalled package supplies file XXXX?"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 5.1
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
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:
Environment:
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
file(s).

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
Try
	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.