Red Hat Bugzilla – Bug 123005
--root and --aid looks for rpmdb in --root
Last modified: 2007-11-30 17:10:42 EST
A --root --aid install to an empty root system fails because rpm looks
for the rpmdb defined in %_solve_dbpath relative to --root instead of
the source system.
However %_solve_pkgsdir is interpreted as being relative to the source
system. This is inconsistent, and it makes it necessary to install the
rpmdb in the destination tree before one can proceed.
Suggestions from the outer root are not necessarily pertinent
to a chroot contained in that root, e.g. the os may be a different
In case of a different version %_solve_pkgsdir is pointing to the
wrong directory anyway.
Thus you can just as well interprete %_solve_dbpath as being relative
to the source system as well.
This is inconsistent.
Let me explain a bit more.
When doing a --root --aid install you draw your macros from /etc/rpm/
in the source system. Thus it is inconsitent to interpret one of the
paths as being relative to the source system and the other as being
relative to the destination system.
In the case of installing a different version in the chroot both
%_solve_pkgsdir and %_solve_dbpath need to be reset accordingly.
Either you interprete both as relative to the source system (which is
more maintainable) or both as relative to the destination system (in
which case it would be more consistent to take the macros from
/etc/rpm/ in the chroot anyway).
Override the macros on the command line using --define.
That still doesn't fix the inconsistency between rpm interpreting
%_solve_dbpath as relative to the destination and %_solve_pkgsdir as
relative to the source.