[Pkg-libvirt-commits] [libguestfs] 158/165: v2v: Move app2_version comparison functions to utils.

Hilko Bengen bengen at moszumanska.debian.org
Sat Aug 30 08:25:25 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 7a68afed14ff9623f5c643e185ab49af6f1505c7
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Mon Jun 23 15:27:37 2014 +0100

    v2v: Move app2_version comparison functions to utils.
    
    Refactoring.
---
 v2v/convert_linux.ml | 20 --------------------
 v2v/utils.ml         | 20 ++++++++++++++++++++
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml
index aa2a499..f41a27b 100644
--- a/v2v/convert_linux.ml
+++ b/v2v/convert_linux.ml
@@ -413,26 +413,6 @@ Grub1/grub-legacy error was: %s")
       );
       false
 
-  and compare_app2_versions app1 app2 =
-    let i = compare app1.G.app2_epoch app2.G.app2_epoch in
-    if i <> 0 then i
-    else (
-      let i = compare_version app1.G.app2_version app2.G.app2_version in
-      if i <> 0 then i
-      else
-        compare_version app1.G.app2_release app2.G.app2_release
-    )
-
-  and compare_app2_version_min app1 (min_epoch, min_version, min_release) =
-    let i = compare app1.G.app2_epoch min_epoch in
-    if i <> 0 then i
-    else (
-      let i = compare_version app1.G.app2_version min_version in
-      if i <> 0 then i
-      else
-        compare_version app1.G.app2_release min_release
-    )
-
   and configure_kernel virtio grub =
     let kernels = grub#list_kernels () in
 
diff --git a/v2v/utils.ml b/v2v/utils.ml
index 6155f9a..9870f1b 100644
--- a/v2v/utils.ml
+++ b/v2v/utils.ml
@@ -42,3 +42,23 @@ let xml_quote_attr str =
 
 external drive_name : int -> string = "v2v_utils_drive_name"
 
+let compare_app2_versions app1 app2 =
+  let i = compare app1.Guestfs.app2_epoch app2.Guestfs.app2_epoch in
+  if i <> 0 then i
+  else (
+    let i =
+      compare_version app1.Guestfs.app2_version app2.Guestfs.app2_version in
+    if i <> 0 then i
+    else
+      compare_version app1.Guestfs.app2_release app2.Guestfs.app2_release
+  )
+
+and compare_app2_version_min app1 (min_epoch, min_version, min_release) =
+  let i = compare app1.Guestfs.app2_epoch min_epoch in
+  if i <> 0 then i
+  else (
+    let i = compare_version app1.Guestfs.app2_version min_version in
+    if i <> 0 then i
+    else
+      compare_version app1.Guestfs.app2_release min_release
+  )

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