From 8d48e7ada3131185cde1ba17da36518061034872 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 21 Feb 2012 12:47:48 +0000
Subject: [PATCH] Ensure when-stmt jobs always run in predictable (name) order.

---
 daemon/daemon.ml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/daemon/daemon.ml b/daemon/daemon.ml
index 80f2cbd..3aee15a 100644
--- a/daemon/daemon.ml
+++ b/daemon/daemon.ml
@@ -181,6 +181,8 @@ and reevaluate_whenjobs jobnames =
   in
   let set = loop StringSet.empty jobnames in
   let jobnames = StringSet.elements set in
+  (* Ensure the jobs always run in predictable (name) order. *)
+  let jobnames = List.sort compare jobnames in
   List.iter run_job
     (List.map (fun jobname -> StringMap.find jobname !jobs) jobnames)
 
-- 
1.8.3.1