From a924fd595f574ecfe5bed8ba7d89a6913b386a01 Mon Sep 17 00:00:00 2001 From: Zhang Qiang Date: Tue, 5 Feb 2013 14:19:50 -0500 Subject: [PATCH] --deps and --rdeps support,#704 --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 | 2 +- gitbuildsys/cmd_build.py | 4 ++++ tools/gbs | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/data/gbs-completion.bash b/data/gbs-completion.bash index 152a945..b827855 100644 --- a/data/gbs-completion.bash +++ b/data/gbs-completion.bash @@ -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=" diff --git a/gitbuildsys/cmd_build.py b/gitbuildsys/cmd_build.py index bdeac94..6c62aed 100644 --- a/gitbuildsys/cmd_build.py +++ b/gitbuildsys/cmd_build.py @@ -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)] diff --git a/tools/gbs b/tools/gbs index e57bee8..d3eb9f3 100755 --- 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 -- 2.7.4