[Pkg-libvirt-commits] [libguestfs] 201/266: v2v: Fix bugs in conversion when uninstalling VMware drivers.
Hilko Bengen
bengen at moszumanska.debian.org
Fri Oct 3 14:42:01 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag debian/1%1.27.35-1
in repository libguestfs.
commit d8e04d454a756946516416df8c7df60289c68cdf
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Thu Aug 28 21:49:48 2014 +0100
v2v: Fix bugs in conversion when uninstalling VMware drivers.
- Don't uninstall open-vm-tools (the old virt-v2v didn't).
- Do fix the library replacement code so it works the same way as
old virt-v2v.
---
v2v/convert_linux.ml | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml
index 5b2ec7c..2c656cd 100644
--- a/v2v/convert_linux.ml
+++ b/v2v/convert_linux.ml
@@ -534,12 +534,14 @@ let rec convert ~keep_serial_console verbose (g : G.guestfs)
let remove = ref [] and libraries = ref [] in
List.iter (
fun { G.app2_name = name } ->
- if name = "open-vm-tools" then
- remove := name :: !remove
- else if string_prefix name "vmware-tools-libraries-" then
+ if string_prefix name "vmware-tools-libraries-" then
libraries := name :: !libraries
else if string_prefix name "vmware-tools-" then
remove := name :: !remove
+ else if name = "VMwareTools" then
+ remove := name :: !remove
+ else if string_prefix name "kmod-vmware-tools" then
+ remove := name :: !remove
) inspect.i_apps;
let libraries = !libraries in
@@ -568,10 +570,14 @@ let rec convert ~keep_serial_console verbose (g : G.guestfs)
(* Install the dependencies with yum. Use yum explicitly
* because we don't have package names and local install is
- * impractical. - RWMJ: Not convinced the original Perl code
- * would work, so I'm just installing the dependencies.
+ * impractical.
*)
- let cmd = [ "yum"; "install"; "-y" ] @ provides in
+ let cmd = ["yum"; "-q"; "resolvedep"] @ provides in
+ let cmd = Array.of_list cmd in
+ let replacements = g#command_lines cmd in
+ let replacements = Array.to_list replacements in
+
+ let cmd = [ "yum"; "install"; "-y" ] @ replacements in
let cmd = Array.of_list cmd in
(try
ignore (g#command cmd);
--
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