summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Maas <opensource@till.name>2010-07-03 20:06:33 +0200
committerTill Maas <opensource@till.name>2010-07-03 20:06:33 +0200
commit561718c892ddaf8e094194044f5666cb05e03530 (patch)
tree19696caaf2cdaa6b2fc458a14026159e7ffe3766
parent856ab4f27ff5fb4420b8804c211748de9e5d805e (diff)
downloadfedora-easy-karma-561718c892ddaf8e094194044f5666cb05e03530.tar.gz
fedora-easy-karma-561718c892ddaf8e094194044f5666cb05e03530.tar.xz
fedora-easy-karma-561718c892ddaf8e094194044f5666cb05e03530.zip
introduce --critpath-only
With this option f-e-k only considers unapproved critpath updates.
-rwxr-xr-xfedora-easy-karma.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/fedora-easy-karma.py b/fedora-easy-karma.py
index b3b6da4..71ef4c7 100755
--- a/fedora-easy-karma.py
+++ b/fedora-easy-karma.py
@@ -73,6 +73,7 @@ class FedoraEasyKarma(object):
parser.add_option("", "--bodhi-cached", dest="bodhi_cached", help="Use cached bodhi query", action="store_true", default=False)
parser.add_option("", "--bodhi-cachedir", dest="bodhi_cachedir", help="Directory to store bodhi cache, default: %default", default="~/.fedora-easy-karma")
parser.add_option("", "--bodhi-update-cache", dest="bodhi_update_cache", help="Update bodhi query cache", action="store_true", default=False)
+ parser.add_option("", "--critpath-only", dest="critpath_only", help="Only consider unapproved critpath updates", action="store_true", default=False)
parser.add_option("", "--debug", dest="debug", help="Enable debug output", action="store_true", default=False)
parser.add_option("", "--default-comment", dest="default_comment", help="Default comment to use, default: %default", default="", metavar="COMMENT")
parser.add_option("", "--default-karma", dest="default_karma", help="Default karma to use, default: %default", default="", metavar="KARMA")
@@ -158,6 +159,7 @@ class FedoraEasyKarma(object):
# extend list of updates with updates that are going to testing to
# support manually installed rpms from koji
testing_updates.extend(bc.query(release=release, status="pending", request="testing", limit=1000)["updates"])
+
if self.options.bodhi_update_cache:
try:
os.makedirs(self.options.bodhi_cachedir)
@@ -171,6 +173,11 @@ class FedoraEasyKarma(object):
self.debug("post processing bodhi query")
+ # reduce to unapproved critpath updates. Cannot query for this in
+ # python-fedora 0.3.20 and might not want to do to keep the cache
+ # complete
+ if self.options.critpath_only:
+ testing_updates = [u for u in testing_updates if u["critpath"] and not u["critpath_approved"]]
# create a mapping build -> update
testing_builds = {}
for update in testing_updates: