[Pkg-libvirt-commits] [virt-manager] 01/03: Make SpiceClientGtk optional

Guido Guenther agx at moszumanska.debian.org
Sun Nov 9 13:58:43 UTC 2014


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

agx pushed a commit to annotated tag debian/1%1.0.1-4
in repository virt-manager.

commit 10067886d1778407b70f812c405ceb3c3a868d7c
Author: Guido Günther <agx at sigxcpu.org>
Date:   Fri Nov 7 21:03:53 2014 +0100

    Make SpiceClientGtk optional
    
    Closes: #763623
---
 debian/control                                    |  2 +-
 debian/patches/Make-SpiceClientGtk-optional.patch | 40 +++++++++++++++++++++++
 debian/patches/series                             |  1 +
 3 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 3155551..c67508b 100644
--- a/debian/control
+++ b/debian/control
@@ -25,12 +25,12 @@ Depends: ${misc:Depends}, ${python:Depends},
  gir1.2-libvirt-glib-1.0,
  gir1.2-gtk-vnc-2.0,
  gir1.2-gtk-3.0 (>= 3.10),
- gir1.2-spice-client-gtk-3.0,
  gir1.2-vte-2.90,
  virtinst (>= ${binary:Version}),
 # For gsettings-data-convert
  gconf2,
 Recommends: libvirt-daemon (>= 1.2.7), gnome-icon-theme,
+ gir1.2-spice-client-gtk-3.0,
 Suggests: virt-viewer, ssh-askpass, gnome-keyring, python-gnomekeyring,
  python-guestfs
 Description: desktop application for managing virtual machines
diff --git a/debian/patches/Make-SpiceClientGtk-optional.patch b/debian/patches/Make-SpiceClientGtk-optional.patch
new file mode 100644
index 0000000..5421223
--- /dev/null
+++ b/debian/patches/Make-SpiceClientGtk-optional.patch
@@ -0,0 +1,40 @@
+From: =?utf-8?q?Guido_G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Fri, 7 Nov 2014 21:03:39 +0100
+Subject: Make SpiceClientGtk optional
+
+---
+ virtManager/console.py | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/virtManager/console.py b/virtManager/console.py
+index b9f98de..edc76ca 100644
+--- a/virtManager/console.py
++++ b/virtManager/console.py
+@@ -25,8 +25,13 @@ from gi.repository import GObject
+ from gi.repository import Gtk
+ from gi.repository import Gdk
+ from gi.repository import GtkVnc
+-from gi.repository import SpiceClientGtk
+-from gi.repository import SpiceClientGLib
++try:
++    from gi.repository import SpiceClientGtk
++    from gi.repository import SpiceClientGLib
++    have_spice_gtk = True
++except ImportError:
++    have_spice_gtk = False
++
+ # pylint: enable=E0611
+ 
+ import libvirt
+@@ -1498,7 +1503,10 @@ class vmmConsolePages(vmmGObjectUI):
+                 self.widget("console-gfx-viewport").add(self.viewer.display)
+                 self.viewer.init_widget()
+             elif ginfo.gtype == "spice":
+-                self.viewer = SpiceViewer(self)
++                if have_spice_gtk:
++                    self.viewer = SpiceViewer(self)
++                else:
++                    raise RuntimeError("Error opening Spice console, SpiceClientGtk missing")
+ 
+             self.set_enable_accel()
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 0c6e63a..7930bea 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ virtinst/Fix-patch-to-pygrub.patch
 Move-GConf-values-to-GSettings.patch
 fix-removable-drive-support.patch
 details-Fix-changing-graphics-type-bz-1083903.patch
+Make-SpiceClientGtk-optional.patch

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



More information about the Pkg-libvirt-commits mailing list