From 9f543862795e6c6cddd74e33dc93d30884f027d1 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jun 02 2020 12:19:08 +0000 Subject: koji-gc: fix history order Fixes: https://pagure.io/koji/issue/2270 --- diff --git a/util/koji-gc b/util/koji-gc index 35f3fbb..0888854 100755 --- a/util/koji-gc +++ b/util/koji-gc @@ -871,6 +871,7 @@ def handle_prune(): print("Pruning tag: %s" % tagname) # get builds history = session.queryHistory(tag=tagname, active=True)['tag_listing'] + history = sorted(history, key=lambda x: -x['create_ts']) if not history: if options.debug: print("No history for %s" % tagname)