Bug 591741 - mock --rebuild fails with IndexError: list index out of range
mock --rebuild fails with IndexError: list index out of range
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
13
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Clark Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-12 19:02 EDT by Filipe Sousa
Modified: 2013-01-10 00:57 EST (History)
8 users (show)

See Also:
Fixed In Version: mock-1.1.1-1.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-28 14:03:13 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)
root.log (16.46 KB, text/x-log)
2010-05-12 19:02 EDT, Filipe Sousa
no flags Details
state.log (271 bytes, text/x-log)
2010-05-12 19:03 EDT, Filipe Sousa
no flags Details
build.log (636 bytes, text/x-log)
2010-05-12 19:04 EDT, Filipe Sousa
no flags Details

  None (edit)
Description Filipe Sousa 2010-05-12 19:02:25 EDT
I'm trying to rebuild a patched package like I did with F12
$ mock --rebuild /home/fsousa/rpmbuild/SRPMS/fontconfig-2.8.0-1.fc13.1.src.rpm

INFO: mock.py version 1.1.0 starting...
State Changed: init plugins
State Changed: start
INFO: Start(/home/fsousa/rpmbuild/SRPMS/fontconfig-2.8.0-1.fc13.1.src.rpm)  Config(fedora-13-x86_64)
State Changed: lock buildroot
State Changed: clean
State Changed: init
State Changed: lock buildroot
Mock Version: 1.1.0
INFO: Mock Version: 1.1.0
INFO: enabled root cache
State Changed: unpacking root cache
INFO: enabled yum cache
State Changed: cleaning yum metadata
INFO: enabled ccache
State Changed: running yum
State Changed: setup
ERROR: Exception(/home/fsousa/rpmbuild/SRPMS/fontconfig-2.8.0-1.fc13.1.src.rpm) Config(fedora-13-x86_64) 0 minutes 8 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-13-x86_64/result
ERROR: Command failed: 
 # /usr/bin/yum --installroot /var/lib/mock/fedora-13-x86_64/root/  install  ccache  'expat-devel' 'gawk' 'freetype-devel >= 2.1.4' 'perl'
Package gawk-3.1.7-3.fc13.x86_64 already installed and latest version
Package 4:perl-5.10.1-112.fc13.x86_64 already installed and latest version

================================================================================
 Package             Arch        Version                 Repository        Size
================================================================================
Installing:
 ccache              x86_64      2.4-17.fc13             fedora            52 k
 expat-devel         x86_64      2.0.1-10.fc13           fedora            54 k
 freetype-devel      x86_64      2.3.11-3.fc13.1         nostradamus      360 k
Installing for dependencies:
 expat               x86_64      2.0.1-10.fc13           fedora            76 k
 freetype            x86_64      2.3.11-3.fc13.1         nostradamus      330 k
 zlib-devel          x86_64      1.2.3-23.fc12           fedora            40 k

Transaction Summary
================================================================================
Install       6 Package(s)
Upgrade       0 Package(s)

Total size: 913 k
Total download size: 690 k
Installed size: 3.5 M
Warning: RPMDB altered outside of yum.
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 254, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 192, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 496, in doTransaction
    resultobject = self.runTransaction(cb=cb)
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1182, in runTransaction
    self.rpmdb.transactionResultVersion(self.tsInfo.futureRpmDBVersion())
  File "/usr/lib/python2.6/site-packages/yum/transactioninfo.py", line 580, in futureRpmDBVersion
    self.rpmdb.preloadPackageChecksums()
  File "/usr/lib/python2.6/site-packages/yum/rpmsack.py", line 755, in preloadPackageChecksums
    pkg = self.searchNevra(n, e, v, r, a)[0]
IndexError: list index out of range
Comment 1 Filipe Sousa 2010-05-12 19:02:44 EDT
Created attachment 413592 [details]
root.log
Comment 2 Filipe Sousa 2010-05-12 19:03:09 EDT
Created attachment 413593 [details]
state.log
Comment 3 Filipe Sousa 2010-05-12 19:04:03 EDT
Created attachment 413594 [details]
build.log
Comment 4 Christoph Wickert 2010-05-13 08:47:05 EDT
Was this system upgraded from F12? I had the same problem and I wondered where the 'RPMDB altered outside of yum' came from. After deleting /var/lib/mock/* and /var/cache/mock/* everything works again.
Comment 5 Filipe Sousa 2010-05-13 09:52:31 EDT
it's a fresh install from yesterday (FC13-RC2).

before each rebuild with mock i had to touch /etc/mock/default.cfg to have the package built with mock
Comment 6 Christoph Wickert 2010-05-13 15:42:13 EDT
Confirmed. One needs to clear the clear the cache or touch the config to rebuild the cache, otherwise 'RPMDB altered outside of yum' appears and mock explodes.
Comment 7 Clark Williams 2010-05-13 16:14:11 EDT
Does the problem persist after you nuke the cache? What I mean is that is it "fixed" after you rebuild the cache or is the cache completely unusable?
Comment 8 Filipe Sousa 2010-05-13 16:30:28 EDT
No, it's not fixed. It only works for the first time.

I mean
# touch /etc/mock/default.cfg (as root)
$ mock --rebuild ... [ok] 
$ mock --rebuild ... [fail]

# touch /etc/mock/default.cfg (as root)
$ mock --rebuild ... [ok]
.
.
.

The same happens for mock -r fedora-13-i386 --rebuild
Comment 9 Adam Goode 2010-05-14 10:54:52 EDT
The fix is here:
http://git.fedorahosted.org/git/?p=mock.git;a=commit;h=426b2ae54daa2d5177fd3cc17e9aab0f1576578c


We just need a new upstream release, or a 1.1.0-2 with this patch.
Comment 10 Clark Williams 2010-05-14 11:12:47 EDT
Doh! Ok, I'll push a 1.1.0-2 out.
Comment 11 Clark Williams 2010-05-14 11:20:00 EDT
Actually, I"ll push a mock-1.1.1-1 for F13 and a mock-1.0-7-1 for F11, F12 and EPEL5
Comment 12 Filipe Sousa 2010-05-14 14:29:35 EDT
I'm trying the new version [1] and it's working. 
Thank you.

[1] http://kojipkgs.fedoraproject.org/packages/mock/1.1.1/1.fc13/noarch/mock-1.1.1-1.fc13.noarch.rpm
Comment 13 Kalev Lember 2010-05-18 05:01:16 EDT
I can also confirm that mock-1.1.1-1.fc13.noarch.rpm from koji fixes this. Can you submit the package to Bodhi too?
Comment 14 Adam Williamson 2010-05-21 01:21:48 EDT
one more confirmation: I had the bug, and 1.1.1 fixes it.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 15 Fedora Update System 2010-05-26 15:40:39 EDT
mock-1.1.1-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/mock-1.1.1-1.fc13
Comment 16 Fedora Update System 2010-05-27 14:34:52 EDT
mock-1.1.1-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/mock-1.1.1-1.fc13
Comment 17 Fedora Update System 2010-05-28 14:03:08 EDT
mock-1.1.1-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

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