[koji PATCH 1/2] accept tag also when doing a single build

Dan HorĂ¡k dan at danny.cz
Thu Jan 10 12:47:40 UTC 2013


A single build with the prefer-new option will be possible when an information
about the tag will be provided.
---
 util/koji-shadow |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/util/koji-shadow b/util/koji-shadow
index 4bbbd31..023511d 100755
--- a/util/koji-shadow
+++ b/util/koji-shadow
@@ -1259,15 +1259,21 @@ class BuildTracker(object):
 
 def main(args):
     tracker = BuildTracker()
-    #binfo = remote.getBuild(args[0], strict=True)
-    #tracker.scanBuild(binfo['id'])
-    tag=None
+    try:
+        tag = args[0]
+    except IndexError:
+        tag = None
+
     if options.build:
         binfo = remote.getBuild(options.build, strict=True)
-        tracker.scanBuild(binfo['id'])
+        tracker.scanBuild(binfo['id'], tag=tag)
     else:
-        tag = args[0]
-        tracker.scanTag(tag)
+        if tag is None:
+            print "Tag is required"
+            return
+        else:
+            print "Working on tag %s" % (tag)
+    	    tracker.scanTag(tag)
     tracker.report()
     tracker.runRebuilds(tag)
 
-- 
1.7.7.6



More information about the buildsys mailing list