[Bug 395177] Re: rpm/poldek --root is broken

Adam Golebiowski adamg at pld-linux.org
Sat Jul 25 15:36:29 CEST 2009


rpm-4.5-18 works while rpm-4.5-19 doesn't. 
I've tracked this down to a single commit, such behaviour is caused by a fix for bug reporeted in #347749
Reverting that change fixes chroot instllation, but it this does not seem like a proper solution.

-- 
rpm/poldek --root is broken
https://bugs.launchpad.net/bugs/395177
You received this bug notification because you are subscribed to PLD
Linux.

Status in PLD Linux Distribution: New

Bug description:
Simply reproducer:

# rm -rf /root/test
# mkdir /root/test
# rpm --init-rpm-dir --root /root/test
# poldek -r /root/test
# poldek> install pdksh
...
# rpm -qa
... (correct list of packages)
But inside chroot:
# chroot /root/test
# rpm -qa
error: cannot open Packages index using db3 - No such file or directory (2)
error: cannot open Packages database in /var/lib/rpm

Workaround is to link create symlink inside chroot:
# ln -s / /root/test

The same bug occurs when creating database with poldek --install-dist instead of rpm --init-rpm-dir

So rpm for some reason expects rpm database in wrong location (/root/test/var/lib/rpm).
Is it related to https://bugs.launchpad.net/pld-linux/+bug/347749 ?

Tested on th/x86_64 (without ready/test)

Packages inside chroot:
[root at beach /]# rpm -qa | grep rpm
rpm-whiteout-1.26-1.noarch
rpm-base-4.5-22.x86_64
rpm-lib-4.5-22.x86_64
rpm-4.5-22.x86_64
rpm-utils-4.5-22.x86_64

Packages outside chroot:
[root at beach /]# [root at beach ~]# rpm -qa | grep rpm
rpm-4.5-22.x86_64
rpm-javaprov-4.5-22.x86_64
rpm-base-4.5-22.x86_64
rpmlist-1.5-1.noarch
rpm-build-4.5-22.x86_64
rpm-php-pearprov-4.5-22.x86_64
rpmorphan-1.4-1.noarch
rpm-build-macros-1.520-2.noarch
rpm-specdump-0.3-6.x86_64
rpm-utils-4.5-22.x86_64
rpm-build-tools-4.4.35-1.noarch
rpm-perlprov-4.5-22.x86_64
rpm-whiteout-1.26-1.noarch
rpm-lib-4.5-22.x86_64
python-rpm-4.5-22.x86_64
rpm-devel-4.5-22.x86_64
rpm-utils-perl-4.5-22.x86_64
rpm-apidocs-4.5-22.x86_64
[root at beach ~]# rpm -qa | grep poldek
poldek-libs-0.30-0.20080820.23.25.x86_64
python-poldek-0.30-0.20080820.23.25.x86_64
poldek-0.30-0.20080820.23.25.x86_64


More information about the pld-bugs mailing list