Berkeley DB 4.6.19 appears to be caching (and using) paths
within a dbenv, which breaks lazy table opens using rpm --root in
rather complicated ways. The fundamental cause is simply that
sometimes file paths need prefixing, and sometimes not.
The quick-n-dirty workaround if you are making extensive use of rpm --
root
is to open all tables before entering the chroot by setting this
macro to 1:
# Open all indices before doing chroot(2).
#
%_openall_before_chroot 0
I say "workaround" because opening all indices before entering chroot
assumes that
a) the tables to be opened never change
b) there is no outside attempt to access from within the chroot,
i.e. doing
chroot /path/to/chroot rpm -qa
instead of doing
rpm -qa --dbpath /path/to/chroot/var/lib/rpm
as each of those accesses opens with different file paths.
However, there are no clear engineering solutions to any of the
above, thank you POSIX and UGLIX.
Because of the often requested feature to be able to install using
rpm --root as an
unprivileged user (chroot(2) is limited to uid=0), the forward
looking development
answer will be to attempt to emulate chroot prefixing for
unprivileged users,
but that too is a largish change that assumes that all file paths
pass only
through a syscall wrapper, not through the syscall itself.
73 de Jeff
______________________________________________________________________
RPM Package Manager http://rpm5.org
Developer Communication List rpm-devel@rpm5.org