Rpm Querying

Scott talbotscott at cox.net
Thu Feb 19 10:17:11 UTC 2004


-----Original Message-----
From: fedora-list-admin at redhat.com
[mailto:fedora-list-admin at redhat.com]On Behalf Of Bevan C. Bennett
Sent: Wednesday, February 18, 2004 2:32 PM
To: fedora-list at redhat.com
Subject: Re: Rpm Querying


Phil Schaffner wrote:
> On Wed, 2004-02-18 at 12:47, Satan wrote:
> 
>>Ok ill be a bit more clearer. Im not getting an error message if i did i 
>>would have said. When i use rpm -qpi package i get all the information. 
>>Grand, but it says on every package i tryed that its not installed even 
>>when it is. Whats causing this?
> 
> 
> The -p flag is used to query the PACKAGE_FILE
> [PACKAGE_NAME.version.arch.rpm] file rather than the database of
> installed RPMs.  Use "rpm -qi PACKAGE_NAME" (just the base name - no
> version required) to query the RPM database.  Do "man rpm" and notice
> the distinction between "PACKAGE_NAME" and "PACKAGE_FILE" usage for
> various options.

As a specific example:
[bevan at saladin fedora-1-updates]> ls strace-4.5.1-1.i386.rpm
strace-4.5.1-1.i386.rpm

[bevan at saladin fedora-1-updates]> rpm -qpi strace-4.5.1-1.i386.rpm
Name        : strace                       Relocations: (not relocateable)
Version     : 4.5.1                             Vendor: Red Hat, Inc.
Release     : 1                             Build Date: Thu 13 Nov 2003 
07:37:23 PM PST
Install Date: (not installed)               Build Host: 
porky.devel.redhat.com
[...]

[bevan at saladin fedora-1-updates]> rpm -qi strace-4.5.1-1.i386.rpm
package strace-4.5.1-1.i386.rpm is not installed

[bevan at saladin fedora-1-updates]> rpm -qi strace
Name        : strace                       Relocations: (not relocateable)
Version     : 4.5.1                             Vendor: Red Hat, Inc.
Release     : 1                             Build Date: Thu 13 Nov 2003 
07:37:23 PM PST
Install Date: Tue 13 Jan 2004 07:45:23 PM PST      Build Host: 
porky.devel.redha


	Try this rpm -qi strace

	note that for installed rpms you do not need to specify version numbers. 
The "error" you are seeing is that RPM is looking at the .rpm file in your 
current directory.

	Scott





More information about the fedora-list mailing list