summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: