Update --binary-list and add --binary-from-file two options. #720
authorHuang Hao <hao.h.huang@intel.com>
Wed, 20 Feb 2013 08:30:27 +0000 (16:30 +0800)
committerHuang Hao <hao.h.huang@intel.com>
Wed, 20 Feb 2013 09:04:24 +0000 (17:04 +0800)
Rename old --binary-list option to --binary-from-file and add a
new --binary-list to accept a comma-separated string to specify
binary list of packages to build.

Change-Id: Icaea10e902915dc08410efb027575a446c024fb9

gitbuildsys/cmd_build.py
tools/gbs

index 6c62aedabde7b001032b70cf7abf6fc89ea499fa..df29cd6a352382f685fac5bcf1c72c9cecf6ef52 100644 (file)
@@ -172,10 +172,13 @@ def prepare_depanneur_opts(args):
     if args.keep_packs:
         cmd_opts += ['--keep-packs']
     if args.binary_list:
-        if not os.path.exists(args.binary_list):
+        blist = [ i.strip() for i in args.binary_list.split(',') ]
+        cmd_opts += ['--binary-list=%s' % ','.join(blist)]
+    if args.binary_from_file:
+        if not os.path.exists(args.binary_from_file):
             raise GbsError('specified binary list file %s not exists' % \
-                        args.binary_list)
-        cmd_opts += ['--binary=%s' % args.binary_list]
+                        args.binary_from_file)
+        cmd_opts += ['--binary-from-file=%s' % args.binary_from_file]
     if args.deps:
         cmd_opts += ['--deps']
     if args.rdeps:
index d3eb9f38975120fe9fd4b33bf1afb707e92689e8..2c3b3e2c4ec8f31a66661b8e16286af03ab9229e 100755 (executable)
--- a/tools/gbs
+++ b/tools/gbs
@@ -230,6 +230,10 @@ def build_parser(parser):
 
     group = parser.add_argument_group('package selection options')
     group.add_argument('--binary-list',
+                       help='specify a package list to be built. Multiple '
+                       'packages can be separated by comma(,). Note: package '
+                       'names are from spec files, not the package dir name')
+    group.add_argument('--binary-from-file',
                         help='specify a binary package list file. Packages '
                        'listed in this file will be selected to be built. '
                        'The format of binary-list file is one package for one '