diff options
author | Michael E Brown <michael_e_brown@dell.com> | 2007-12-04 17:00:26 -0600 |
---|---|---|
committer | Michael E Brown <michael_e_brown@dell.com> | 2007-12-04 17:00:26 -0600 |
commit | 38751f05060ef76e8777a21f3e5fe88f4baf7001 (patch) | |
tree | 5c825a63e1fe343f8078671a9d8b22fef25b23d5 /py/mock.py | |
parent | e1d2de8c53bd0f39e1efb9ca6c95d454552123b0 (diff) | |
download | mock-38751f05060ef76e8777a21f3e5fe88f4baf7001.tar.gz mock-38751f05060ef76e8777a21f3e5fe88f4baf7001.tar.xz mock-38751f05060ef76e8777a21f3e5fe88f4baf7001.zip |
error when trying to build multiple srpms without --resultdir.
Diffstat (limited to 'py/mock.py')
-rwxr-xr-x | py/mock.py | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -213,7 +213,7 @@ def setup_default_config_opts(config_opts): } decorate(traceLog(log)) -def set_config_opts_per_cmdline(config_opts, options): +def set_config_opts_per_cmdline(config_opts, options, args): "takes processed cmdline args and sets config options." # do some other options and stuff if options.arch: @@ -245,6 +245,10 @@ def set_config_opts_per_cmdline(config_opts, options): raise mock.exception.BadCmdline( "Must specify --resultdir when using --cleanup-after") + if len(args) > 1 and not options.resultdir: + raise mock.exception.BadCmdline( + "Must specify --resultdir when building multiple RPMS.") + if options.cleanup_after == False: config_opts['cleanup_on_success'] = False config_opts['cleanup_on_failure'] = False @@ -378,7 +382,7 @@ def main(ret): # cmdline options override config options log.info("mock.py version %s starting..." % __VERSION__) - set_config_opts_per_cmdline(config_opts, options) + set_config_opts_per_cmdline(config_opts, options, args) # do whatever we're here to do chroot = mock.backend.Root(config_opts, uidManager) |