--deps and --rdeps support,#704
authorZhang Qiang <qiang.z.zhang@intel.com>
Tue, 5 Feb 2013 19:19:50 +0000 (14:19 -0500)
committerZhang Qiang <qiang.z.zhang@intel.com>
Wed, 6 Feb 2013 19:34:46 +0000 (14:34 -0500)
--rdeps: build specified packages and packages depend on them
--deps: build all specified packages and packages they depend on

Change-Id: If5470238eb57bea48e1e316e35c0ab492493ccd9

data/gbs-completion.bash
gitbuildsys/cmd_build.py
tools/gbs

index 152a945..b827855 100644 (file)
@@ -104,7 +104,7 @@ __gbs ()
     ch_opts="--message= --since= --packaging-dir="
     cr_opts="--root"
     lbex_opts="--no-configure --exclude-from-file= --exclude= --binary-list= --threads=\
-        --incremental --overwrite --clean-once --debug $lb_opts"
+        --incremental --overwrite --clean-once --debug --deps --rdeps $lb_opts"
     cl_opts="--upstream-branch= --all --depth="
     pull_opts="--upstream-branch= --force --depth="
 
index bdeac94..6c62aed 100644 (file)
@@ -176,6 +176,10 @@ def prepare_depanneur_opts(args):
             raise GbsError('specified binary list file %s not exists' % \
                         args.binary_list)
         cmd_opts += ['--binary=%s' % args.binary_list]
+    if args.deps:
+        cmd_opts += ['--deps']
+    if args.rdeps:
+        cmd_opts += ['--rdeps']
     cmd_opts += ['--threads=%s' % args.threads]
     cmd_opts += ['--packaging-dir=%s' % get_packaging_dir(args)]
 
index e57bee8..d3eb9f3 100755 (executable)
--- a/tools/gbs
+++ b/tools/gbs
@@ -243,6 +243,12 @@ def build_parser(parser):
                         'format is one package in one line, and only binary '
                         'RPM package name is accepted. Packages listed in '
                         'this file will be skipped to be built.')
+    group.add_argument('--deps', action='store_true',
+                        help='build specified packages and all packages '
+                        'they depend on')
+    group.add_argument('--rdeps', action='store_true',
+                        help='build specified packages and all packages '
+                        'depend on them')
 
     parser.set_defaults(alias="lb")
     return parser