RPM

Comment 3 for bug 651524

Revision history for this message
In , Bruce (bruce-redhat-bugs) wrote :

I have made an odd observation with regard to this.
Given a test script as below the transaction lock either succeeds or fails on the basis of the INSTALLROOT dir chosen.
On the same machine I have one directory where the installation succeeds and all others where it does not. I am at a loss to explain this.

I have also observed that even when it does succeed here the exit status is non-zero.
The man-page for RPM is unusual in not describing the exit status
(or indeed the --fsmdebug & --rpmiodebug options I have seen mention elsewhere)

#!/bin/sh
#
# create RPM db & install AMS RPMs for this test dir
#

INSTALLROOT=`pwd`
RPMDIR=`pwd`/rpms

mkdir $INSTALLROOT
cp -r $RPMDIR $INSTALLROOT/rpms
cd $INSTALLROOT

cd $INSTALLROOT
rm -rf `pwd`/rpmdb

mkdir `pwd`/rpmdb
rpmdb --initdb --dbpath `pwd`/rpmdb

# copy system wide RPM database
# (otherwise basic things like libc will be missing dependencies)
# cp /var/lib/rpm/* rpmdb/.

rpm --dbpath `pwd`/rpmdb --root `pwd` --force --relocate /=`pwd` -ivh $INSTALLROOT/rpms/*.rpm --nodeps
echo STATUS=$?