Bug 912624 - mock: list index out of range
Summary: mock: list index out of range
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-19 08:39 UTC by Mikolaj Izdebski
Modified: 2013-05-05 02:29 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-05-04 01:40:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
don't assume we have logging handler installed (856 bytes, patch)
2013-04-01 21:42 UTC, Clark Williams
no flags Details | Diff

Description Mikolaj Izdebski 2013-02-19 08:39:33 UTC
Description of problem:
Mock assumes that there are handlers installed for some loggers.

Loggers are user-configurable in /etc/mock/logging.ini. In my case I removed handler for mockbuild.Root.state logger:

[logger_state]
level: NOTSET
; unadorned_console only outputs INFO or above
handlers:
qualname: mockbuild.Root.state
propagate: 0

This causes mock to bail out with --quiet:

$ mock --quiet shell
ERROR: list index out of range
Traceback (most recent call last):
  File "/usr/sbin/mock", line 539, in <module>
    def do_buildsrpm(config_opts, chroot, options, args):
  File "/usr/sbin/mock", line 703, in main
    logging.getLogger("mockbuild.Root.state").handlers[0].setLevel(logging.WARNING)
IndexError: list index out of range

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


How reproducible:
always

Steps to Reproduce:
1. mock init
2. remove handler for mockbuild.Root.state from logging.ini
3. mock shell --quiet

Actual results:
abnormal termination with IndexError: list index out of range

Expected results:
no error with --quiet given

Comment 1 Clark Williams 2013-04-01 21:40:57 UTC
I've fixed the assumption you hit in mock.py. No guarantees further on in the actual chroot code (backend.py).

queued for 1.1.31 release

Comment 2 Clark Williams 2013-04-01 21:42:04 UTC
Created attachment 730495 [details]
don't assume we have logging handler installed

patch to fix index-out-of-range error when logging disabled in logging.ini

Comment 3 Fedora Update System 2013-04-16 17:34:14 UTC
mock-1.1.31-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.31-1.fc19

Comment 4 Fedora Update System 2013-04-16 17:35:19 UTC
mock-1.1.31-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/mock-1.1.31-1.fc17

Comment 5 Fedora Update System 2013-04-16 17:36:13 UTC
mock-1.1.31-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.31-1.el6

Comment 6 Fedora Update System 2013-04-16 17:37:10 UTC
mock-1.1.31-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/mock-1.1.31-1.fc18

Comment 7 Fedora Update System 2013-04-17 16:21:47 UTC
Package mock-1.1.31-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mock-1.1.31-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5858/mock-1.1.31-1.fc19
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-04-18 20:27:30 UTC
mock-1.1.32-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/mock-1.1.32-1.fc17

Comment 9 Fedora Update System 2013-04-18 20:28:42 UTC
mock-1.1.32-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/mock-1.1.32-1.fc18

Comment 10 Fedora Update System 2013-04-18 20:30:02 UTC
mock-1.1.32-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.32-1.el6

Comment 11 Fedora Update System 2013-04-18 20:31:39 UTC
mock-1.1.32-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mock-1.1.32-1.fc19

Comment 12 Fedora Update System 2013-05-04 01:40:39 UTC
mock-1.1.32-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2013-05-05 02:28:37 UTC
mock-1.1.32-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2013-05-05 02:29:48 UTC
mock-1.1.32-1.fc17 has been pushed to the Fedora 17 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.