rpm command line argument '--initdb' does not accept
the '--root' argument. This is bad since our automated
boostrap of RPM on Solaris would be easier if we could
treat every command the same and always use the '--root'
for each rpm command until our OS is completely installed
and the chroot is no longer necessary.
There is a futher complication as it appears that the rpmrc
file is needed to be in the default locatoin EVEN if we
specify its true location. You will notice that we get
errors redirecting the '--dbpath' since there is no rpmrc
on the solaris machine where the jumpstart is taking place.
We use rpm-2.5.6.
Here is some hardware stuff but that should be irrelivant
SunOS build01 5.6 Generic_105181-15 sun4u sparc
SUNW,UltraAX-MP
Here is my error log:
# /a/usr/local/bin/rpm --root /a --initdb
Unable to open /usr/local/lib/rpm/rpmrc for reading: No such
file or
directory.
# /a/usr/local/bin/rpm --root /a/ --initdb
Unable to open /usr/local/lib/rpm/rpmrc for reading: No such
file or
directory.
# /a/usr/local/bin/rpm --initdb --dbpath
/a/usr/local/lib/rpm --rcfile
/a/usr>
Unable to open /usr/local/lib/rpm/rpmrc for reading: No such
file or
directory.

rpm-2.5.x *requires* .../usr/lib/rpm/rpmrc to be present. This
has been fixed in rpm-3.0.x by permitting --rcfile to permit
colon separated paths only the 1st of which is required to
exist. If you wish to change this behavior in rpm-2.5.x, look
at lib/rpmrc.c: it's a pretty easy hack to implement the rpm-3.0.x
behavior (read: add --rcfile /usr/lib/rpm/rpmrc w/o chroot).
Alternatively:
mkdir -p <your_root_here>/usr/local/lib/rpm
cp /usr/lib/rpm/rpmrc <your_root_here>/usr/local/lib/rpm/rpmrc
before running "rpm -r <your_root_here> ..."

Note

You need to
log in
before you can comment on or make changes to this bug.