Bug 505699 - "/usr/bin/yum --installroot /var/lib/mock/fedora-11-i386/root/ resolvedep ccache 'taglib-devel' 'curl-devel' 'ncurses-devel'" fails
"/usr/bin/yum --installroot /var/lib/mock/fedora-11-i386/root/ resolvedep c...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-12 20:05 EDT by Michal Nowak
Modified: 2014-01-21 18:09 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-24 08:44:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michal Nowak 2009-06-12 20:05:02 EDT
Description of problem:

Mock rebuild fails on 

root ~ # mock -r fedora-11-i386 /home/newman/rpmbuild/SRPMS/ncmpcpp-0.3.4-1.fc11.src.rpm 
INFO: mock.py version 0.9.16 starting...
State Changed: init plugins
State Changed: start
INFO: Start(/home/newman/rpmbuild/SRPMS/ncmpcpp-0.3.4-1.fc11.src.rpm)  Config(fedora-11-i386)
State Changed: lock buildroot
State Changed: clean
State Changed: init
State Changed: lock buildroot
Mock Version: 0.9.16
INFO: Mock Version: 0.9.16
INFO: enabled root cache
INFO: enabled yum cache
State Changed: cleaning yum metadata
INFO: enabled ccache
State Changed: running yum
State Changed: creating cache
State Changed: setup
ERROR: Exception(/home/newman/rpmbuild/SRPMS/ncmpcpp-0.3.4-1.fc11.src.rpm) Config(fedora-11-i386) 4 minutes 57 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-11-i386/result
ERROR: Command failed: 
 # /usr/bin/yum --installroot /var/lib/mock/fedora-11-i386/root/  resolvedep  ccache  'taglib-devel' 'curl-devel' 'ncurses-devel'
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 157, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 189, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 652, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 239, in _getConfig
    self._conf = config.readMainConfig(startupconf)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 794, in readMainConfig
    yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 873, in _getsysver
    hdr = idx.next()
StopIteration


Even this fails, when ran manually: 

/usr/bin/yum --installroot /var/lib/mock/fedora-11-i386/root/

Version-Release number of selected component (if applicable):

mock-0.9.16-1.fc11.noarch
yum-3.2.23-3.fc11.noarch

How reproducible:

always
Comment 1 James Antill 2009-06-13 20:06:34 EDT
 The code here is:

    idx = ts.dbMatch('provides', distroverpkg)
    if idx.count() == 0:
        releasever = '$releasever'
    else:
        hdr = idx.next()
        releasever = hdr['version']

...so this looks like a weird rpm or rpm-python bug. What versions of rpm are you using?
Comment 2 Michal Nowak 2009-06-14 13:34:29 EDT
rpm-4.7.0-1.fc11.i586
Comment 3 Panu Matilainen 2009-06-18 07:10:59 EDT
My first guess: dont run mock as root (see bug 487430, this is probably a dupe of that)
Comment 4 Michal Nowak 2009-06-24 02:29:52 EDT
Running under sudo is not helping either:

newman ~ $ sudo mock -r fedora-11-i386 /home/newman/rpmbuild/SRPMS/ncmpcpp-0.3.4-1.fc11.src.rpm 
INFO: mock.py version 0.9.16 starting...
State Changed: init plugins
State Changed: start
INFO: Start(/home/newman/rpmbuild/SRPMS/ncmpcpp-0.3.4-1.fc11.src.rpm)  Config(fedora-11-i386)
State Changed: lock buildroot
State Changed: clean
State Changed: init
ERROR: Could not create dir /var/lib/mock/fedora-11-i386/result. Error: [Errno 13] Permission denied: '/var/lib/mock/fedora-11-i386/result'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/mock/util.py", line 61, in mkdirIfAbsent
    os.makedirs(dirName)
  File "/usr/lib/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/lib/mock/fedora-11-i386/result'
ERROR: Exception(/home/newman/rpmbuild/SRPMS/ncmpcpp-0.3.4-1.fc11.src.rpm) Config(fedora-11-i386) 0 minutes 14 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-11-i386/result
ERROR: Could not create dir /var/lib/mock/fedora-11-i386/result. Error: [Errno 13] Permission denied: '/var/lib/mock/fedora-11-i386/result'
Comment 5 Panu Matilainen 2009-06-24 03:04:54 EDT
Dont run under sudo either. Add yourself to "mock" group and run without further gimmicks, that's how it's intended to work. You probably need to clean up various leftover directories/files that now have wrong permissions due to earlier runs as root.
Comment 6 Michal Nowak 2009-06-24 03:49:37 EDT
That worked. Thanks.

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