Bug 528743 - Rpm inside mock chroot has really weird behaviour wrt. paths
Summary: Rpm inside mock chroot has really weird behaviour wrt. paths
Keywords:
Status: CLOSED DUPLICATE of bug 507309
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-13 14:50 UTC by James Antill
Modified: 2014-01-21 23:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-10-14 14:11:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description James Antill 2009-10-13 14:50:27 UTC
Description of problem:
 All testing is on Fedora 11/x86_64 with a mock chroot config. of Fedora 11/x86_64 (vanilla config. file). If I do:

% mock init
[...]
% mock shell bash
mock-chroot> rpm -q glibc
glibc-2.10.1-5.x86_64
mock-chroot> exit
% mock install zsh
INFO: mock.py version 0.9.17 starting...
[...]
 # /usr/bin/yum --installroot /var/lib/mock/fedora-11-x86_64/root/  install yum
Traceback (most recent call last):
[...]
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 807, in readStartupConfig
    startupconf.releasever = _getsysver(startupconf.installroot, startupconf.distroverpkg)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 929, in _getsysver
    hdr = idx.next()
StopIteration

...which is yum's way of saying "we searched for distroverpkg, rpm returned an idx.count() != 0 but then when we tried to find the first one we failed".

 Probably related is that if I do:

% mock init
[...]
% mock install zsh
[...]
% mock shell bash
[root@code]/# rpm -q glibc
error: cannot open Packages index using db3 - No such file or directory (2)
error: cannot open Packages database in /var/lib/rpm
error: cannot open Packages database in /var/lib/rpm
package glibc is not installed

...doing an strace on rpm shows this:


open("/var/lib/rpm/__db.004", O_RDWR)   = 5
fcntl(5, F_GETFD)                       = 0
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
mmap(NULL, 753664, PROT_READ|PROT_WRITE, MAP_SHARED, 5, 0) = 0x7f7f96633000
close(5)                                = 0
stat("/var/lib/rpm/Packages", {st_mode=S_IFREG|0644, st_size=5296128, ...}) = 0
open("/var/lib/rpm/Packages", O_RDONLY) = 5
fcntl(5, F_GETFD)                       = 0
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
read(5, "\0\0\0\0\1\0\0\0\0\0\0\0a\25\6\0\t\0\0\0\0\20\0\0\0\10\0\0\0\0\0\0\f"..., 512) = 512
close(5)                                = 0
open("/var/lib/mock/fedora-11-x86_64/root/var/lib/rpm/Packages", O_RDONLY) = -1 ENOENT (No such file or directory)

...and if I do:

[root@code]/# mkdir -p /var/lib/mock/fedora-11-x86_64/root    
[root@code]/# cd /var/lib/mock/fedora-11-x86_64/root
[root@code]/var/lib/mock/fedora-11-x86_64/root# ln -s /var

...then everything works fine again (I can do "mock install" and "mock shell rpm -q glibc" as long as I want).

Version-Release number of selected component (if applicable):
mock.noarch                        0.9.17-3.fc11                      @updates
rpm.x86_64                         4.7.1-1.fc11                       @updates
yum.noarch                         3.2.24-9.fc12                      @rawhide

Comment 1 Panu Matilainen 2009-10-14 07:40:50 UTC
This is essentially a dupe of bug 507309, rpm-4.7.1-3.fc11 in updates-testing should fix it.

Comment 2 James Antill 2009-10-14 14:11:25 UTC
Nods ... good enough for me, thanks.

*** This bug has been marked as a duplicate of bug 507309 ***


Note You need to log in before you can comment on or make changes to this bug.