Hello community,

here is the log from the commit of package python-virtinst for openSUSE:13.1 
checked in at 2013-10-02 13:33:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1/python-virtinst (Old)
 and      /work/SRC/openSUSE:13.1/.python-virtinst.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-virtinst"

Changes:
--------
--- /work/SRC/openSUSE:13.1/python-virtinst/python-virtinst.changes     
2013-09-23 11:07:03.000000000 +0200
+++ /work/SRC/openSUSE:13.1/.python-virtinst.new/python-virtinst.changes        
2013-10-02 13:33:29.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Oct  1 13:36:48 UTC 2013 - cbosdon...@suse.com
+
+- Don't write ram XML attribute for video devices other than QXL.
+  virtinst-ram-qxl-only.patch fixes bnc#829284
+
+-------------------------------------------------------------------

New:
----
  virtinst-ram-qxl-only.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-virtinst.spec ++++++
--- /var/tmp/diff_new_pack.YZDCSi/_old  2013-10-02 13:33:29.000000000 +0200
+++ /var/tmp/diff_new_pack.YZDCSi/_new  2013-10-02 13:33:29.000000000 +0200
@@ -55,6 +55,7 @@
 Patch21:        virtinst-clone-disks.patch
 Patch22:        virtinst-use-qemu-driver-cdrom.patch
 Patch23:        virtinst-cdrom-install.patch
+Patch24:        virtinst-ram-qxl-only.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 #BuildArch: noarch
@@ -99,6 +100,7 @@
 %patch21 -p1
 %patch22 -p1
 %patch23 -p1
+%patch24 -p1
 
 %build
 python setup.py build

++++++ virtinst-ram-qxl-only.patch ++++++
diff --git a/virtinst/VirtualVideoDevice.py b/virtinst/VirtualVideoDevice.py
index 138b151..f05128b 100644
--- a/virtinst/VirtualVideoDevice.py
+++ b/virtinst/VirtualVideoDevice.py
@@ -41,6 +41,7 @@ class VirtualVideoDevice(VirtualDevice.VirtualDevice):
         self._model_type    = None
         self._vram          = None
         self._heads         = None
+        self._ram           = None
 
         if self._is_parse():
             return
@@ -55,6 +56,10 @@ class VirtualVideoDevice(VirtualDevice.VirtualDevice):
         return self._model_type
     def set_model_type(self, val):
         self._model_type = val
+        # Reset ram value for other types than qxl
+        # or we'll have troubles later as libvirt failures
+        if val != "qxl":
+            self.ram = None
     model_type = _xml_property(get_model_type, set_model_type,
                                xpath="./model/@type")
 
@@ -72,6 +77,13 @@ class VirtualVideoDevice(VirtualDevice.VirtualDevice):
     heads = _xml_property(get_heads, set_heads,
                           xpath="./model/@heads")
 
+    def get_ram(self):
+        return self._ram
+    def set_ram(self, val):
+        self._ram = val
+    ram = _xml_property(get_ram, set_ram,
+                         xpath="./model/@ram")
+
     def _get_xml_config(self):
         model = self.model_type
         if self.model_type == self.MODEL_DEFAULT:
@@ -84,6 +96,8 @@ class VirtualVideoDevice(VirtualDevice.VirtualDevice):
             model_xml += " vram='%s'" % self.vram
         if self.heads:
             model_xml += " heads='%s'" % self.heads
+        if self.ram and model != "qxl":
+            model_xml += " ram='%s'" % self.ram
         model_xml += "/>\n"
 
         xml = ("    <video>\n" +
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to