Update kerneldb.
[virt-mem.git] / extract / fedora-koji / fedora_koji_download_kernels.ml
index 89879e4..57abfd3 100644 (file)
@@ -197,6 +197,13 @@ let main outputdir =
   let nr_builds = List.length builds in
   printf "%d kernel builds found on Koji.\n%!" nr_builds;
 
+  (* Sort the builds by build ID in reverse, so that we tend to download
+   * the most recent kernels first.
+   *)
+  let builds =
+    let cmp { build_id = id1 } { build_id = id2 } = compare id2 id1 in
+    List.sort ~cmp builds in
+
   List.iteri (
     fun i build ->
       printf "Build %d/%d: %s\n" (i+1) nr_builds (string_of_build build);