Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

obtain installed rpm status

Status
Not open for further replies.

adicohen

Programmer
Oct 7, 2004
12
IL
Hi all,
I'm a newbie in Linux so my question may be stuppied...
what is equivilent to solaris "pkginfo -l" command in linux?
i need to know if rpm is "completly installed" or "partlly installed"
i'll elaborate , just in case
in solaris if packge installation aborted during the installation it's marked as installed in the "db" ( same as rpm -q )
but it's status classify it as partly installed, is there an equivelent in linux ?

Thanks in advance.
 
Thanks geirendre
but i know those site and could not find the answer there...
 
From my experience the packages are either installed or not. If the package fails during install all changes are backed out. There is no equivalent. You can verify if all the files are present for any installed package(s) using the -V option. It takes a while but that's as close as you will get.

I'm giving geirendre a star because I couldn't remember the syntax so used his links to verify. [thumbsup2]
 
You could also check the /var/log/ directory to see
if there are logfiles for the package-manager there.
Then search them for traces of failed installations....
Code:
egrep -i '(fail|error|warn)' /var/log/rpmlog*
or something simmilar ;-)
 
Don't know if this will give you the required info, but have you tried;

rpm -qa -v --info

Gives you verbose information on all queried packages
 
Code:
root@bec1 ~]# rpm -e cdplayer
[root@bec1 ~]# rpm -qi cdplayer-1.0-1
package cdplayer-1.0-1 is not installed
[root@bec1 ~]# rpm -i /var/tmp/cdplayer-1.0-1.i386.rpm 
error: %post(cdplayer-1.0-1.i386) scriptlet failed, exit status 1
[root@bec1 ~]# rpm -qi cdplayer-1.0-1
Name        : cdplayer                     Relocations: (not relocatable)
Version     : 1.0                               Vendor: White Socks Software, Inc.
Release     : 1                             Build Date: Sun 25 Nov 2007 12:25:57 PM IST
Install Date: Mon 26 Nov 2007 03:30:46 PM IST      Build Host: bec1
Group       : Applications/Sound            Source RPM: cdplayer-1.0-1.src.rpm
Size        : 0                                License: GPL
Signature   : (none)
Packager    : Santa Claus <sclaus@northpole.com>
URL         : [URL unfurl="true"]http://www.gnomovision.com/cdplayer/cdplayer.html[/URL]
Summary     : A CD player app that rocks!
Description :
It slices! It dices! It.s a CD player app that
can.t be beat. By using the resonant frequency
of the CD itself, it is able to simulate 20X
oversampling. This leads to sound quality that
cannot be equaled with more mundane software...
[root@bec1 ~]#

you can seesenario above.no rollback is one
geirendre - thanks for the input i couldn't find error in log yet but i'll keep looking
 
I believe your misconception may result from

"rpm -qi cdplayer-1.0-1"

You probably should be looking for just "cdplayer" without the version.

Another way to query the rpm db is

"rpm -qa | grep -i cdplayer"

D.E.R. Management - IT Project Management Consulting
 
thedaver-I was hoping you are right...
,i checked both commands
"rpm -qi cdplayer-" and "rpm -qa|grep cdplayer"
both returns that cdplayer is installed.

 
i 'll try to clerify me Q.
I install rpm ( cdplayer )
as you can see above ,post script failed- but yet i can not find a way to know about it later.
since only exit code is wrong but all rpm queries return same output as successful installation.

hope it's clearer now,
Adi
 
OK, so it's possible that you had/have multiple instances of the same package installed as different versions...

Do this:
"rpm -qa | grep -i cdplayer"

For every version that returns do
"rpm -e cdplayer-x.xx.x"

We'd need to see the output from that entire session to debug this further for you.

D.E.R. Management - IT Project Management Consulting
 
adicohen,

The error message was about the "post" scriplet. The "post" scriptlet is run after the RPM has been installed.

You can take a look at the rpm's scripts by typing:

rpm -q --scripts cdplayer

Look for the "postinstall scriplet" section of the output and see if you can determine what part of it failed.

The "cdplayer" RPM sounds like the example rpm given in one of the RPM tutorials. Is that what you're playing with?

--
ZaSter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top