]> err.no Git - dak/commitdiff
queue-report: sort changes correctly (Closes: #704231)
authorLuca Falavigna <dktrkranz@debian.org>
Sun, 21 Apr 2013 01:01:22 +0000 (01:01 +0000)
committerLuca Falavigna <dktrkranz@debian.org>
Sun, 21 Apr 2013 01:01:22 +0000 (01:01 +0000)
dak/queue_report.py

index 1bef3e55915bd9de7b1b43e04120a69ffe377190..3a98df5837e55a33bb9956460d0e36533ddeaeab 100755 (executable)
@@ -385,6 +385,7 @@ def process_queue(queue, log, rrd_dir):
             if handler.get_action():
                 per_source[source]["processed"] = " | PENDING %s" % handler.get_action()
         per_source[source]["list"].append(upload)
+        per_source[source]["list"].sort(lambda x, y: cmp(x.changes.created, y.changes.created), reverse=True)
     # Determine oldest time and have note status for each source group
     for source in per_source.keys():
         source_list = per_source[source]["list"]
@@ -484,7 +485,7 @@ def process_queue(queue, log, rrd_dir):
         arches_list = list(arches)
         arches_list.sort(utils.arch_compare_sw)
         arch_list = " ".join(arches_list)
-        version_list = " ".join(versions)
+        version_list = " ".join(sorted(versions, reverse=True))
         if len(version_list) > max_version_len:
             max_version_len = len(version_list)
         if len(arch_list) > max_arch_len: