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);