[PATCH] Use tagHistory to grab all tags where the package is tagged

Dennis Gregorovic dgregor at redhat.com
Wed Mar 10 16:44:18 UTC 2010


From: dennis <dennis at thinkpad.(none)>

---
 cli/koji |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/cli/koji b/cli/koji
index bd8a031..e58d79d 100755
--- a/cli/koji
+++ b/cli/koji
@@ -1870,7 +1870,13 @@ def anon_handle_latest_by_tag(options, session, args):
     pathinfo = koji.PathInfo()
 
     for pkg in args:
-        tags = [x['name'] for x in session.listTags(package=pkg)]
+        hist = session.tagHistory(package=pkg)
+        tags = {}
+        for x in hist:
+            if not x['active']:
+                continue
+            tags[x['tag_name']] = True
+        tags = tags.keys()
         tags.sort()
 
         for tag in tags:
-- 
1.6.6.1



More information about the buildsys mailing list