Description of problem: The following traceback is received: $ /usr/bin/mock --define="dist .el5.4.z" --print-root-path --uniqueext=XXXX Traceback (most recent call last): File "/usr/sbin/mock", line 493, in def do_buildsrpm(config_opts, chroot, options, args): File "/usr/sbin/mock", line 643, 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): mock-1.1.12-1 How reproducible: Spuratic ... I have no idea what is triggering this error. Additional Info: Obviously this isn't the greatest bit of information to resolve a 'bug' as the issue is likely something I am doing. This is a build system where Mock is used on the backend and narrowing this down is proving difficult. My request is simply to add a try/except to catch this error condition... something like: --- mock.orig 2011-09-09 15:38:38.000000000 -0400 +++ mock 2011-09-23 14:28:10.111438352 -0400 @@ -640,7 +640,11 @@ # set logging verbosity if options.verbose == 0: log.handlers[0].setLevel(logging.WARNING) - logging.getLogger("mockbuild.Root.state").handlers[0].setLevel(logging.WARNING) + try: + logging.getLogger("mockbuild.Root.state").handlers[0].setLevel(logging.WARNING) + except IndexError: + # What happened? + pass elif options.verbose == 1: log.handlers[0].setLevel(logging.INFO) elif options.verbose == 2:
I'm on Fedora 14 and seeing this exception since updating to mock-1.1.14-1.fc14.noarch
I missed this BZ when updating mock to 1.1.15, but I believe that it will fix your problems. Please try the mock-1.1.15 package in updates testing and let me know if the problem still exists for you.
1.1.15 fixes the issue for me. Thanks.
Cool, When 1.1.15 goes stable I'll close this BZ as well.