diff mbox

kvm_vm: add build/lib to LD_LIBRARY_PATH for qemu_cmd

Message ID 1309118124-8080-2-git-send-email-alevy@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alon Levy June 26, 2011, 7:55 p.m. UTC
build/lib can contain libspice-server.so built from git.
---
 client/virt/kvm_vm.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Comments

Lucas Meneghel Rodrigues June 28, 2011, 1:50 a.m. UTC | #1
On Sun, Jun 26, 2011 at 4:55 PM, Alon Levy <alevy@redhat.com> wrote:
> build/lib can contain libspice-server.so built from git.
> ---
>  client/virt/kvm_vm.py |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/client/virt/kvm_vm.py b/client/virt/kvm_vm.py
> index 3fa4b1a..48a1fc5 100644
> --- a/client/virt/kvm_vm.py
> +++ b/client/virt/kvm_vm.py
> @@ -403,6 +403,9 @@ class VM(virt_vm.BaseVM):
>         # Set the X11 display parameter if requested
>         if params.get("x11_display"):
>             qemu_cmd += "DISPLAY=%s " % params.get("x11_display")
> +        # Update LD_LIBRARY_PATH for built libraries (libspice-server)
> +        qemu_cmd += "LD_LIBRARY_PATH=%s " % (
> +            os.path.abspath(os.path.join(self.root_dir, 'build/lib')))

^ Better to check whether the lib directory actually exists before
trying to append LD_LIBRARY_PATH to the command. This details, and
some other on the following paths were fixed in the version that went
upstream.

Thanks Alon!

>         # Add the qemu binary
>         qemu_cmd += qemu_binary
>         # Add the VM's name
> --
> 1.7.5.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Lucas Meneghel Rodrigues June 28, 2011, 1:56 a.m. UTC | #2
Here are the commits from your patchset with the small corrections:

http://autotest.kernel.org/changeset/5456
http://autotest.kernel.org/changeset/5457
http://autotest.kernel.org/changeset/5458
http://autotest.kernel.org/changeset/5459

Let's figure out how to accomplish what you need to do next. Thanks!

Lucas

On Sun, Jun 26, 2011 at 4:55 PM, Alon Levy <alevy@redhat.com> wrote:
> build/lib can contain libspice-server.so built from git.
> ---
>  client/virt/kvm_vm.py |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/client/virt/kvm_vm.py b/client/virt/kvm_vm.py
> index 3fa4b1a..48a1fc5 100644
> --- a/client/virt/kvm_vm.py
> +++ b/client/virt/kvm_vm.py
> @@ -403,6 +403,9 @@ class VM(virt_vm.BaseVM):
>         # Set the X11 display parameter if requested
>         if params.get("x11_display"):
>             qemu_cmd += "DISPLAY=%s " % params.get("x11_display")
> +        # Update LD_LIBRARY_PATH for built libraries (libspice-server)
> +        qemu_cmd += "LD_LIBRARY_PATH=%s " % (
> +            os.path.abspath(os.path.join(self.root_dir, 'build/lib')))
>         # Add the qemu binary
>         qemu_cmd += qemu_binary
>         # Add the VM's name
> --
> 1.7.5.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
diff mbox

Patch

diff --git a/client/virt/kvm_vm.py b/client/virt/kvm_vm.py
index 3fa4b1a..48a1fc5 100644
--- a/client/virt/kvm_vm.py
+++ b/client/virt/kvm_vm.py
@@ -403,6 +403,9 @@  class VM(virt_vm.BaseVM):
         # Set the X11 display parameter if requested
         if params.get("x11_display"):
             qemu_cmd += "DISPLAY=%s " % params.get("x11_display")
+        # Update LD_LIBRARY_PATH for built libraries (libspice-server)
+        qemu_cmd += "LD_LIBRARY_PATH=%s " % (
+            os.path.abspath(os.path.join(self.root_dir, 'build/lib')))
         # Add the qemu binary
         qemu_cmd += qemu_binary
         # Add the VM's name