Description of problem: The site-defaults.cfg contains documentation lines such as: config_opts['plugin_conf']['lvm_root_opts']['volume_group'] = 'my_vg' But when I tried to enable similar line, I just got following error: File "/etc/mock/site-defaults.cfg", line 126, in <module> config_opts['plugin_conf']['lvm_root_opts']['volume_group'] = 'vg_fedora' KeyError: 'lvm_root_opts' ERROR: Error in configuration Version-Release number of selected component (if applicable): $ rpm -q mock mock-1.2.0-1.fc20.noarch How reproducible: Steps to Reproduce: 1. enable some of config_opts['plugin_conf']['lvm_root_opts'] lines in site-defaults.cfg 2. 3. Actual results: File "/etc/mock/site-defaults.cfg", line 126, in <module> config_opts['plugin_conf']['lvm_root_opts']['volume_group'] = 'vg_fedora' KeyError: 'lvm_root_opts' ERROR: Error in configuration Expected results: No error. Additional info: According to [1], the configuration should look like config_opts['plugin_conf']['lvm_root_opts'] = { 'volume_group': 'my-volume-group', } which works for me. [1] http://xpath-of-light.blogspot.cz/2014/10/new-features-in-mock-12.html
It's a python dictionary, so the first form fails becuase it reads nonexistent key, while the other one writes it. I agree that it's counterintuitive and the plugin_conf dictionaries for plugins distributed with mock should be prepopulated (or use some form of defaultdict).
KISS. Put in example initialization of that dictionary. Fixed in commit 89e93ec
mock-1.2.1-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.1-1.fc21
mock-1.2.1-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.1-1.fc20
mock-1.2.1-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.1-1.el7
mock-1.2.1-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.1-1.el6
(In reply to Miroslav Suchý from comment #2) > KISS. Put in example initialization of that dictionary. > Fixed in commit 89e93ec Well, shouldn't be the lines such as "config_opts['plugin_conf']['lvm_root_opts'] = {}" uncommented by default? Not sure I could figure out I'm supposed to uncomment this line when I want to use the later options.
Package mock-1.2.1-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing mock-1.2.1-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-15217/mock-1.2.1-1.fc20 then log in and leave karma (feedback).
mock-1.2.3-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.3-1.fc21
mock-1.2.3-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.3-1.fc20
mock-1.2.3-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.3-1.el7
mock-1.2.3-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.3-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.3-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.