[Yum] passing --dbpath (again!)
Loïc Minier
lool+duke at via.ecp.fr
Mon Nov 6 16:41:28 UTC 2006
Hi there,
I'm running Yum 3.0.1 and RPM 4.4.2 under Debian and I am trying to
bootstrap RPM based systems with mach which will generate a yum.conf
like this:
[main]
cachedir = /../../../../../var/cache/mach/centos-4-i386/yum
reposdir = /../../../../../var/lib/mach/states/centos-4-i386-os/yum/yum.repos.d
under /var/lib/mach/states/centos-4-i386-os/yum.conf to bootstrap a
chroot starting with:
yum -c /var/lib/mach/states/centos-4-i386-os/yum.conf --installroot=/var/lib/mach/roots/centos-4-i386-os -y -y install bash glibc
Yum processes happily to downloading, dependencies solving etc., but
barks at the RPM transaction set run:
...
warning: termcap-5.4-3: Header V3 DSA signature: NOKEY, key ID
443e1821
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
error: can't create transaction lock on /var/lib/rpm/__db.000
I simply don't have /var/lib/rpm (geez, I'm running Debian :-P).
I think it would make the most sense to let Yum use the chroot's RPM
db. I believe Yum correctly sets RPM's --root via the Python bindings
of RPM, but I think it doesn't set --dbpath properly.
Setting %_dbpath in /etc/rpm/macros before running mach, like below:
%_dbpath /var/lib/mach/roots/centos-4-i386-os/var/lib/rpm
works like a charm, but is terribly ugly.
Should Yum be changed to set --dbpath when --installroot is set? Or
should Yum support some way to set any RPM macro via yum.conf?
The ML archives suggest this question was asked frequently; perhaps it
should be promoted to the FAQ.
Thanks for comments,
--
Loïc Minier <lool at dooz.org>
More information about the Yum
mailing list