Description of problem:
"rpm -ivh --excludedocs --badreloc --relocate /=/newroot" fails to relocate the
package from the / directory to the /newroot directory
Version-Release number of selected component (if applicable):
I have tried both rpm-4.1-1.06 and rpm-4.1-8x and both fail.
Steps to Reproduce:
1.Download binutils-sh-linux-2.11.2-6.i386.rpm and gcc-sh-linux-3.0.3-5.i386.rpm
from www.sh-linux.org (These are the RPMs I used, but any RPM should work (that
is they should fail :) )).
2.Create a /newroot directory
3.Try to install a relocated RPM using the folllowing command:
rpm -ivh --excludedocs --badreloc --relocate /=/newroot XXX.i386.rpm
Using the sh-linux packages mentioned in step 1. allows me to see that the files
(sh*-linux-*) are installed in /usr/bin/... instead of /newroot/usr/bin/...
I expect the package to be installed as if the root was /newroot.
Using the version of RPM that came (and I kept up2date) with RedHat 7.2 worked.
It wasn't until I upgraded to RedHat 8.0 that things started to fail.
Yup, --relocate is/was broken in rpm-4.1.
This is now fixed in rpm-4.2.