$ mock --version
Mock's -r argument requires that the value be the name of a target, sans .cfg, which is looked up in /etc/mock or, if specified, the --configdir .
This is very inconvenient when doing builds with non-default targets, especially if those targets are managed in an SCM. While --configdir works, using it has two issues:
- Mock requires site-defaults.cfg to be in --configdir so you can't keep the targets separate from site-specific configuration that involves local paths; and
- You can't use stock targets from /etc/mock as well as those in a different location
Both these issues would be resolved if mock checked the value of -r to see if it ends in .cfg and if so, treat it as a path.
Any objections? I'll see if I can put together a patch anyway.
Sounds reasonable to me.
Here we go then.
Created attachment 923731 [details]
Add support for target paths to mock
Patch to add suggested feature
Any thoughts on merging this?
See also #1129932 which might be useful for users of this option.
Commited as 72683cc.
Because it does not apply clean any more, I had to rewrite it little bit. And I edited man page to describe this feature.
Thanks for contribution.
mock-1.2.1-1.fc21 has been submitted as an update for Fedora 21.
mock-1.2.1-1.fc20 has been submitted as an update for Fedora 20.
mock-1.2.1-1.el7 has been submitted as an update for Fedora EPEL 7.
mock-1.2.1-1.el6 has been submitted as an update for Fedora EPEL 6.
* 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:
then log in and leave karma (feedback).
mock-1.2.3-1.fc21 has been submitted as an update for Fedora 21.
mock-1.2.3-1.fc20 has been submitted as an update for Fedora 20.
mock-1.2.3-1.el7 has been submitted as an update for Fedora EPEL 7.
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.