Add arguments, --preordered-list and --local-only 88/251288/1 accepted/tizen/devbase/tools/20210205.025115 submit/trunk/20210201.152700 submit/trunk/20210201.152731 submit/trunk/20210202.092731 submit/trunk/20210204.140030
authorHyokeun Jeon <hyokeun.jeon@samsung.com>
Tue, 12 Jan 2021 07:30:14 +0000 (16:30 +0900)
committerHyokeun Jeon <hyokeun.jeon@samsung.com>
Tue, 12 Jan 2021 07:30:14 +0000 (16:30 +0900)
Change-Id: Ic35d67b72b367efd490ada1a9ae3817bc5e43287

gitbuildsys/cmd_build.py
gitbuildsys/cmd_depends.py
tools/gbs

index df97a18..4e89f95 100644 (file)
@@ -296,6 +296,10 @@ def prepare_depanneur_opts(args):
     if args.icecream > 0:
         cmd_opts += ['--icecream=%s' % args.icecream]
 
+    if args.preordered_list > 0:
+        olist = [i.strip() for i in args.preordered_list.split(',')]
+        cmd_opts += ['--preordered-list=%s' % ','.join(olist)]
+
     cmd_opts += ['--threads=%s' % args.threads]
     if args.kvm:
         loopdev = len([name for name in os.listdir('/dev') if bool(re.search("loop[0-9]",name))])
@@ -811,3 +815,4 @@ def main(args):
         raise GbsError('some packages failed to be built')
     else:
         log.info('Done')
+
index 1b45b57..99db219 100644 (file)
@@ -1,4 +1,3 @@
-
 #!/usr/bin/python -tt
 # vim: ai ts=4 sts=4 et sw=4
 #
@@ -59,6 +58,9 @@ def prepare_depanneur_opts(args):
     cmd_opts += ['--packaging-dir=%s' % get_packaging_dir(args)]
     cmd_opts += ['--depends']
 
+    if args.local_only:
+        cmd_opts += ['--depends-local-only']
+
     if args.style:
         cmd_opts += ['--style=%s' % args.style]
 
@@ -209,6 +211,7 @@ def main(args):
 
     if args.tarfile:
         cmd += ['--tarfile']
+
     # Extra depanneur special command options
     cmd += prepare_depanneur_opts(args)
 
@@ -224,3 +227,4 @@ def main(args):
         raise GbsError('some packages failed to be generate depends files')
     else:
         log.info('Done')
+
index fef16a7..14d4119 100755 (executable)
--- a/tools/gbs
+++ b/tools/gbs
@@ -338,6 +338,10 @@ def build_parser(parser):
                         help='specify source type: git, or tar, default is git')
     group.add_argument('--export-only', action='store_true',
                         help='only export, not building')
+    group.add_argument('--preordered-list', default='',
+                        help='Provide comma(,) separated list of ordered packages '
+                        'to support user defined build order calculation.')
+
     parser.set_defaults(alias="lb")
     return parser
 
@@ -631,6 +635,8 @@ def depends_parser(parser):
                         help='directory containing packaging files')
     group.add_argument('--style', default='git',
                         help='specify source type: git, or tar, default is git')
+    group.add_argument('--local-only', action='store_true',
+                        help='generate depends only from local repo rpms')
 
     return parser