On Thu, Aug 27, 2015 at 15:38:18 +0200, Sven Ulland wrote: > After a Yum-based bootstrap, the RPM database remains empty, and thus > causes problems for rpm and Yum itself:
Please compare rpm --root "$rootdir" rpm -qa with chroot "$rootdir" rpm -qa When packages are installed and queried outside the chroot, it is using Debian's rpm configuration. Notably, Debian sets %_dbpath to ~/.rpmdb. Therefore your chroot's RPM database is in $rootdir/root/.rpmdb instead of the CentOS native default of /var/lib/rpm. > How is Yum supposed to synchronize with the RPM database during an > installroot bootstrap? The best way is to ensure you use a consistent RPM database path between host and chroot. The Debian default is fine for casual users of RPM, but for your use case you may want to (re)set %_dbpath to /var/lib/rpm. E.g. mkdir -p /etc/rpm echo %_dbpath /var/lib/rpm > /etc/rpm/macros.dbpath rpm --initdb This will then be propagated to your chroot when it is created, and the configuration will match both inside and outside the chroot. Or alternatively you could edit the rpm configuration *inside* the chroot to tell it that %_dbpath is /root/.rpmdb. Does that address your problems with yum/rpm/bootstrap? Thanks, -- mike