From: wanchao.xu Date: Thu, 21 Nov 2024 07:16:14 +0000 (+0800) Subject: Add '--max-retry-times' option for gbs build. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fsandbox%2Fxuwc%2Fmax_retry_times;p=tools%2Fgbs.git Add '--max-retry-times' option for gbs build. Change-Id: I8f4347b95ce3fe50c14d68d47aca26987aef474c Signed-off-by: wanchao.xu --- diff --git a/gitbuildsys/cmd_build.py b/gitbuildsys/cmd_build.py index ae10dd6..f2cd061 100644 --- a/gitbuildsys/cmd_build.py +++ b/gitbuildsys/cmd_build.py @@ -317,6 +317,7 @@ def prepare_depanneur_opts(args): 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 diff --git a/tools/gbs b/tools/gbs index 5ef1f5f..51bbc14 100755 --- a/tools/gbs +++ b/tools/gbs @@ -250,6 +250,8 @@ def build_parser(parser): 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',