[Pkg-libvirt-commits] [libguestfs] 16/61: sysprep: Perform operations in alphabetical order.

Hilko Bengen bengen at moszumanska.debian.org
Sat Mar 29 14:36:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit f450fb41060c8e0d8a14dc869a54b8981b8fc99c
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Fri Mar 21 10:47:51 2014 +0000

    sysprep: Perform operations in alphabetical order.
    
    Previously we ran them in essentially a random order, although it
    might have looked alphabetical in some cases because the modules are
    loaded in order.
---
 sysprep/sysprep_operation.ml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sysprep/sysprep_operation.ml b/sysprep/sysprep_operation.ml
index 703bcc7..6d878b8 100644
--- a/sysprep/sysprep_operation.ml
+++ b/sysprep/sysprep_operation.ml
@@ -51,6 +51,8 @@ and extra_arg = {
   extra_pod_description : string;
 }
 
+let compare_operations { name = n1 } { name = n2 } = compare n1 n2
+
 let defaults = {
   name = "";
   enabled_by_default = false;
@@ -277,6 +279,9 @@ let perform_operations_on_filesystems ?operations ?(quiet = false) g root
     | Some opset -> (* just the operation names listed *)
       OperationSet.elements opset in
 
+  (* Perform the operations in alphabetical, rathern than random order. *)
+  let ops = List.sort compare_operations ops in
+
   List.iter (
     function
     | { name = name; perform_on_filesystems = Some fn } ->
@@ -296,6 +301,9 @@ let perform_operations_on_devices ?operations ?(quiet = false) g root
     | Some opset -> (* just the operation names listed *)
       OperationSet.elements opset in
 
+  (* Perform the operations in alphabetical, rathern than random order. *)
+  let ops = List.sort compare_operations ops in
+
   List.iter (
     function
     | { name = name; perform_on_devices = Some fn } ->

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list