[Pkg-libvirt-commits] [libguestfs] 154/165: v2v: Rename Convert_linux_common -> Lib_linux.

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 76bf3f7289c6d43e9b240299e37079bb03afc4f4
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Mon Jun 23 14:12:42 2014 +0100

    v2v: Rename Convert_linux_common -> Lib_linux.
    
    Just library name refactor.
---
 po/POTFILES-ml                                  |  2 +-
 v2v/Makefile.am                                 |  4 +--
 v2v/convert_linux_enterprise.ml                 | 34 ++++++++++++-------------
 v2v/convert_linux_grub.ml                       |  6 ++---
 v2v/{convert_linux_common.ml => lib_linux.ml}   |  0
 v2v/{convert_linux_common.mli => lib_linux.mli} |  2 +-
 6 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/po/POTFILES-ml b/po/POTFILES-ml
index b47e7db..c3d4a97 100644
--- a/po/POTFILES-ml
+++ b/po/POTFILES-ml
@@ -82,10 +82,10 @@ sysprep/sysprep_operation_user_account.ml
 sysprep/sysprep_operation_utmp.ml
 sysprep/sysprep_operation_yum_uuid.ml
 v2v/cmdline.ml
-v2v/convert_linux_common.ml
 v2v/convert_linux_enterprise.ml
 v2v/convert_linux_grub.ml
 v2v/convert_windows.ml
+v2v/lib_linux.ml
 v2v/source_libvirt.ml
 v2v/target_local.ml
 v2v/types.ml
diff --git a/v2v/Makefile.am b/v2v/Makefile.am
index 3b50a89..379eb2b 100644
--- a/v2v/Makefile.am
+++ b/v2v/Makefile.am
@@ -24,10 +24,10 @@ EXTRA_DIST = \
 CLEANFILES = *~ *.cmi *.cmo *.cmx *.cmxa *.o virt-v2v
 
 SOURCES_MLI = \
-	convert_linux_common.mli \
 	convert_linux_enterprise.mli \
 	convert_linux_grub.mli \
 	convert_windows.mli \
+	lib_linux.mli \
 	source_libvirt.mli \
 	target_local.mli \
 	types.mli \
@@ -37,9 +37,9 @@ SOURCES_ML = \
 	types.ml \
 	utils.ml \
 	xml.ml \
+	lib_linux.ml \
 	cmdline.ml \
 	source_libvirt.ml \
-	convert_linux_common.ml \
 	convert_linux_grub.ml \
 	convert_linux_enterprise.ml \
 	convert_windows.ml \
diff --git a/v2v/convert_linux_enterprise.ml b/v2v/convert_linux_enterprise.ml
index e3cfab8..a876c1e 100644
--- a/v2v/convert_linux_enterprise.ml
+++ b/v2v/convert_linux_enterprise.ml
@@ -104,7 +104,7 @@ Grub1/grub-legacy error was: %s")
           else
             None
       ) apps in
-    Convert_linux_common.remove verbose g inspect xenmods;
+    Lib_linux.remove verbose g inspect xenmods;
 
     (* Undo related nastiness if kmod-xenpv was installed. *)
     if xenmods <> [] then (
@@ -119,7 +119,7 @@ Grub1/grub-legacy error was: %s")
 
       (* Check it's not owned by an installed application. *)
       let dirs = List.filter (
-        fun d -> not (Convert_linux_common.file_owned verbose g inspect d)
+        fun d -> not (Lib_linux.file_owned verbose g inspect d)
       ) dirs in
 
       (* Remove any unowned xenpv directories. *)
@@ -177,7 +177,7 @@ Grub1/grub-legacy error was: %s")
         fun { G.app2_name = name } -> name = package_name
       ) apps in
     if has_guest_additions then
-      Convert_linux_common.remove verbose g inspect [package_name];
+      Lib_linux.remove verbose g inspect [package_name];
 
     (* Guest Additions might have been installed from a tarball.  The
      * above code won't detect this case.  Look for the uninstall tool
@@ -209,7 +209,7 @@ Grub1/grub-legacy error was: %s")
           ignore (g#command [| vboxuninstall |]);
 
           (* Reload Augeas to detect changes made by vbox tools uninst. *)
-          Convert_linux_common.augeas_reload verbose g
+          Lib_linux.augeas_reload verbose g
         with
           G.Error msg ->
             warning ~prog (f_"VirtualBox Guest Additions were detected, but uninstallation failed.  The error message was: %s (ignored)")
@@ -282,7 +282,7 @@ Grub1/grub-legacy error was: %s")
     );
 
     let remove = !remove in
-    Convert_linux_common.remove verbose g inspect remove;
+    Lib_linux.remove verbose g inspect remove;
 
     (* VMware Tools may have been installed from a tarball, so the
      * above code won't remove it.  Look for the uninstall tool and run
@@ -294,7 +294,7 @@ Grub1/grub-legacy error was: %s")
         ignore (g#command [| uninstaller |]);
 
         (* Reload Augeas to detect changes made by vbox tools uninst. *)
-        Convert_linux_common.augeas_reload verbose g
+        Lib_linux.augeas_reload verbose g
       with
         G.Error msg ->
           warning ~prog (f_"VMware tools was detected, but uninstallation failed.  The error message was: %s (ignored)")
@@ -309,7 +309,7 @@ Grub1/grub-legacy error was: %s")
     let pkgs = List.map (fun { G.app2_name = name } -> name) pkgs in
 
     if pkgs <> [] then (
-      Convert_linux_common.remove verbose g inspect pkgs;
+      Lib_linux.remove verbose g inspect pkgs;
 
       (* Installing these guest utilities automatically unconfigures
        * ttys in /etc/inittab if the system uses it. We need to put
@@ -455,7 +455,7 @@ Grub1/grub-legacy error was: %s")
         | [] -> None
         | path :: paths ->
           let kernel =
-            Convert_linux_common.inspect_linux_kernel verbose g inspect path in
+            Lib_linux.inspect_linux_kernel verbose g inspect path in
           match kernel with
           | None -> loop paths
           | Some kernel when is_hv_kernel kernel -> loop paths
@@ -483,11 +483,11 @@ Grub1/grub-legacy error was: %s")
             | [] -> "kernel"
             | path :: paths ->
               let kernel =
-                Convert_linux_common.inspect_linux_kernel verbose g inspect
+                Lib_linux.inspect_linux_kernel verbose g inspect
                   path in
               match kernel with
               | None -> loop paths
-              | Some kernel -> kernel.Convert_linux_common.base_package
+              | Some kernel -> kernel.Lib_linux.base_package
           in
           loop kernels in
 
@@ -504,7 +504,7 @@ Grub1/grub-legacy error was: %s")
          *)
         let files1 = g#ls "/lib/modules" in
         let files1 = Array.to_list files1 in
-        Convert_linux_common.install verbose g inspect [current_kernel];
+        Lib_linux.install verbose g inspect [current_kernel];
         let files2 = g#ls "/lib/modules" in
         let files2 = Array.to_list files2 in
 
@@ -521,14 +521,14 @@ Grub1/grub-legacy error was: %s")
         in
         let version = loop files1 files2 in
 
-        { Convert_linux_common.base_package = current_kernel;
+        { Lib_linux.base_package = current_kernel;
           version = version; modules = []; arch = "" } in
 
     (* Set /etc/sysconfig/kernel DEFAULTKERNEL to point to the new
      * kernel package name.
      *)
     if g#is_file ~followsymlinks:true "/etc/sysconfig/kernel" then (
-      let base_package = bootable_kernel.Convert_linux_common.base_package in
+      let base_package = bootable_kernel.Lib_linux.base_package in
       let paths =
         g#aug_match "/files/etc/sysconfig/kernel/DEFAULTKERNEL/value" in
       let paths = Array.to_list paths in
@@ -537,13 +537,13 @@ Grub1/grub-legacy error was: %s")
     );
 
     (* Return the installed kernel version. *)
-    bootable_kernel.Convert_linux_common.version
+    bootable_kernel.Lib_linux.version
 
-  and supports_virtio { Convert_linux_common.modules = modules } =
+  and supports_virtio { Lib_linux.modules = modules } =
     List.mem "virtio_blk" modules && List.mem "virtio_net" modules
 
   (* Is it a hypervisor-specific kernel? *)
-  and is_hv_kernel { Convert_linux_common.modules = modules } =
+  and is_hv_kernel { Lib_linux.modules = modules } =
     List.mem "xennet" modules           (* Xen PV kernel. *)
 
   (* Find a suitable replacement for kernel-xen. *)
@@ -661,7 +661,7 @@ Grub1/grub-legacy error was: %s")
 
   clean_rpmdb ();
   autorelabel ();
-  Convert_linux_common.augeas_init verbose g;
+  Lib_linux.augeas_init verbose g;
   let grub = get_grub () in
 
   unconfigure_xen ();
diff --git a/v2v/convert_linux_grub.ml b/v2v/convert_linux_grub.ml
index 1b02141..cb8c5c8 100644
--- a/v2v/convert_linux_grub.ml
+++ b/v2v/convert_linux_grub.ml
@@ -213,7 +213,7 @@ let rec grub1 verbose (g : Guestfs.guestfs) inspect =
       List.exists (fun incl -> g#aug_get incl = config_file) incls in
     if not incls_contains_conf then (
       g#aug_set "/augeas/load/Grub/incl[last()+1]" config_file;
-      Convert_linux_common.augeas_reload verbose g;
+      Lib_linux.augeas_reload verbose g;
     ) in
 
   new grub1 verbose g inspect config_file grub_fs
@@ -224,7 +224,7 @@ and grub1_convert_from_efi verbose g dev =
   g#ln_sf "/boot/grub/grub.conf" "/etc/grub.conf";
 
   (* Reload Augeas to pick up new location of grub.conf. *)
-  Convert_linux_common.augeas_reload verbose g;
+  Lib_linux.augeas_reload verbose g;
 
   ignore (g#command [| "grub-install"; dev |])
 
@@ -311,7 +311,7 @@ and grub2_convert_from_efi verbose g inspect dev =
   (* EFI systems boot using grub2-efi, and probably don't have the
    * base grub2 package installed.
    *)
-  Convert_linux_common.install verbose g inspect ["grub2"];
+  Lib_linux.install verbose g inspect ["grub2"];
 
   (* Relabel the EFI boot partition as a BIOS boot partition. *)
   g#part_set_gpt_type dev 1 "21686148-6449-6E6F-744E-656564454649";
diff --git a/v2v/convert_linux_common.ml b/v2v/lib_linux.ml
similarity index 100%
rename from v2v/convert_linux_common.ml
rename to v2v/lib_linux.ml
diff --git a/v2v/convert_linux_common.mli b/v2v/lib_linux.mli
similarity index 98%
rename from v2v/convert_linux_common.mli
rename to v2v/lib_linux.mli
index 4ab621a..5c642de 100644
--- a/v2v/convert_linux_common.mli
+++ b/v2v/lib_linux.mli
@@ -16,7 +16,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *)
 
-(** Common Linux conversion code. *)
+(** Common Linux functions. *)
 
 val augeas_init : bool -> Guestfs.guestfs -> unit
 val augeas_reload : bool -> Guestfs.guestfs -> unit

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