[PATCH 4/5] Add skip-diffs option for import_srpms

Lars R. Damerow lars at pixar.com
Sun Sep 7 03:25:25 UTC 2014


From: "Lars R. Damerow" <lars at pixar.com>

This makes it easier to do unattended imports of a large number of srpms.
---
 src/pyrpkg/cli.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/pyrpkg/cli.py b/src/pyrpkg/cli.py
index 9733a6b..80812e6 100755
--- a/src/pyrpkg/cli.py
+++ b/src/pyrpkg/cli.py
@@ -539,6 +539,10 @@ defined, packages will be built sequentially.""" %
         #import_srpm_parser.add_argument('--create', '-c',
         #                                help = 'Create a new local repo',
         #                                action = 'store_true')
+        import_srpm_parser.add_argument('--skip-diffs',
+                                        help = "Don't show diffs when \
+                                        import srpms",
+                                        action = 'store_true')
         import_srpm_parser.add_argument('srpm',
                                         help = 'Source rpm to import')
         import_srpm_parser.set_defaults(command = self.import_srpm)
@@ -1064,7 +1068,8 @@ defined, packages will be built sequentially.""" %
         uploadfiles = self.cmd.import_srpm(self.args.srpm)
         if uploadfiles:
             self.cmd.upload(uploadfiles, replace=True)
-        self.cmd.diff(cached=True)
+        if not self.args.skip_diffs:
+            self.cmd.diff(cached=True)
         self.log.info('--------------------------------------------')
         self.log.info("New content staged and new sources uploaded.")
         self.log.info("Commit if happy or revert with: git reset --hard HEAD")
-- 
1.8.3.1



More information about the buildsys mailing list