[Yum-devel] [PATCH] Get correct rpmdb path from rpm configuration
Mike Miller
mtmiller at ieee.org
Thu Jun 28 18:28:02 UTC 2012
On Thu, Jun 28, 2012 at 11:30 AM, James Antill wrote:
> On Thu, 2012-06-28 at 08:05 -0400, Mike Miller wrote:
>> Fixes failure after install when system stores rpmdb in a non-standard
>> location.
>> ---
>> This is a fix for the error reported here:
>> http://lists.baseurl.org/pipermail/yum-devel/2012-March/009110.html
>>
>> Reproduced and tested on an up-to-date Fedora 17 by moving /var/lib/rpm
>> and adding "%_dbpath /path/to/other/rpmdb" to /etc/rpm/macros.
>
> Not sure how this can work well with --installroot, also don't see how
> it could have worked in 3.2.25.
Works well enough for me with --installroot. The host's value of
%_dbpath is now used consistently by rpm and yum. The rpmdb is
created/updated inside installroot under this directory. Packages are
unpacked into installroot. Subsequent rpm/yum commands with the same
installroot access the rpmdb at the correct path.
Chroot into the installroot, yeah you may have some minor
configuration issues to work out, but ATM I am only looking at
installing/updating the chroot from the host.
If you can suggest specific things that may break I'm willing to test them out.
In 3.2.25 yum only accessed rpmdb through the rpm module, which
consistently uses %_dbpath.
> Also seems bad to be using /var/lib/yum
> when we aren't using /var/lib/rpm ... not sure of a better solution
> though.
I agree it's best to have everything together under /var/lib, and this
doesn't change that default. This change just makes yum aware of the
fact that rpm can configure its database to be anywhere, just like yum
can point persistdir anywhere.
--
mike
More information about the Yum-devel
mailing list