From ed24a47b8610cce4ae7d5fd58409d5825774ea50 Mon Sep 17 00:00:00 2001 From: "wanchao.xu" Date: Thu, 21 Nov 2024 15:16:14 +0800 Subject: [PATCH] Add '--max-retry-times' option for gbs build. Change-Id: I8f4347b95ce3fe50c14d68d47aca26987aef474c Signed-off-by: wanchao.xu --- gitbuildsys/cmd_build.py | 1 + tools/gbs | 2 ++ 2 files changed, 3 insertions(+) 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', -- 2.34.1