if not args.threads < loopdev:
raise GbsError('When using the kvm, loop device should be larger than the threads option.')
cmd_opts += ['--packaging-dir=%s' % get_packaging_dir(args)]
+ cmd_opts += ['--max-retry-times=%d' % args.max_retry_times]
return cmd_opts
group.add_argument('--deps-build', action='store_true',
help='Download packages depends on local package from gbs.conf, and do build')
group.add_argument('--snapshot', type=str, help='Specify snapshot id to use')
+ group.add_argument('--max-retry-times', type=int, default=3,
+ help='maximum times to rebuild if the build can be built successfully')
group = parser.add_argument_group('speed up building options')
group.add_argument('--incremental', action='store_true',