Add --clean-repos option, #548
authorZhang Qiang <qiang.z.zhang@intel.com>
Tue, 27 Nov 2012 08:20:18 +0000 (16:20 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Wed, 28 Nov 2012 02:19:44 +0000 (10:19 +0800)
This option is used to cleanup local repos generated by 'gbs build'

If there're some old RPMs in 'gbs build's local repo, this option
can be used to clean up them.

Change-Id: I1ccbceaa01c8c20a909102727a76e2cf314b80d9

gitbuildsys/cmd_build.py
tools/gbs

index dfd9b38..2e5226f 100644 (file)
@@ -162,6 +162,8 @@ def prepare_depanneur_opts(args):
         cmd_opts += ['--overwrite']
     if args.clean_once:
         cmd_opts += ['--clean-once']
+    if args.clean_repos:
+        cmd_opts += ['--clean-repos']
     if args.debug:
         cmd_opts += ['--debug']
     if args.incremental:
index 4f149b8..9cfa7d6 100755 (executable)
--- a/tools/gbs
+++ b/tools/gbs
@@ -141,6 +141,9 @@ def build_parser(parser):
                              'without the "profile." prefix')
     parser.add_argument('-C', '--clean', action='store_true',
                         help='delete old build root before initialization')
+    parser.add_argument('--clean-repos', action='store_true',
+                        help='clean up local repos created by gbs build '
+                        'before building packages')
     parser.add_argument('--ccache', action="store_true",
                         help='use ccache to speed up rebuilds')
     parser.add_argument('--skip-conf-repos', action="store_true",