Bug 591741 - mock --rebuild fails with IndexError: list index out of range
Summary: mock --rebuild fails with IndexError: list index out of range
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 13
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-12 23:02 UTC by Filipe Sousa
Modified: 2013-01-10 05:57 UTC (History)
8 users (show)

Fixed In Version: mock-1.1.1-1.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-28 18:03:13 UTC


Attachments (Terms of Use)
root.log (16.46 KB, text/x-log)
2010-05-12 23:02 UTC, Filipe Sousa
no flags Details
state.log (271 bytes, text/x-log)
2010-05-12 23:03 UTC, Filipe Sousa
no flags Details
build.log (636 bytes, text/x-log)
2010-05-12 23:04 UTC, Filipe Sousa
no flags Details

Description Filipe Sousa 2010-05-12 23:02:25 UTC
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 23:02:44 UTC
Created attachment 413592 [details]
root.log

Comment 2 Filipe Sousa 2010-05-12 23:03:09 UTC
Created attachment 413593 [details]
state.log

Comment 3 Filipe Sousa 2010-05-12 23:04:03 UTC
Created attachment 413594 [details]
build.log

Comment 4 Christoph Wickert 2010-05-13 12:47:05 UTC
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 13:52:31 UTC
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 19:42:13 UTC
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 20:14:11 UTC
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 20:30:28 UTC
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 14:54:52 UTC
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 15:12:47 UTC
Doh! Ok, I'll push a 1.1.0-2 out.

Comment 11 Clark Williams 2010-05-14 15:20:00 UTC
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 18:29:35 UTC
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 09:01:16 UTC
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 05:21:48 UTC
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 19:40:39 UTC
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 18:34:52 UTC
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 18:03:08 UTC
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.