[releng PATCH 3/3] add --dry-run option

Dan HorĂ¡k dan at danny.cz
Fri Feb 22 10:14:58 UTC 2013


---
 scripts/sync-tagged-primary.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/scripts/sync-tagged-primary.py b/scripts/sync-tagged-primary.py
index b1448f4..33f3105 100755
--- a/scripts/sync-tagged-primary.py
+++ b/scripts/sync-tagged-primary.py
@@ -33,6 +33,7 @@ import argparse
 
 # get architecture and tags from command line
 parser = argparse.ArgumentParser()
+parser.add_argument("--dry-run", help="no changes will be made", action="store_true")
 parser.add_argument("arch", help="secondary arch to sync")
 parser.add_argument("tag", nargs="+", help="tag to sync")
 args = parser.parse_args()
@@ -111,6 +112,9 @@ for tag in args.tag:
                     tountag.append(pkg['nvr'])
                     print "need to untag %s" % pkg['nvr']
 
+    if args.dry_run:
+        continue
+
     seckojisession.multicall = True
     for pkg in totag:
         print "Tagging: Arch: %s Tag: %s Package: %s" % (args.arch, tag, pkg)
-- 
1.7.7.6



More information about the buildsys mailing list