Hello community,

here is the log from the commit of package virt-manager for openSUSE:Factory 
checked in at 2017-12-08 13:02:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/virt-manager (Old)
 and      /work/SRC/openSUSE:Factory/.virt-manager.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "virt-manager"

Fri Dec  8 13:02:00 2017 rev:162 rq:555104 version:1.4.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/virt-manager/virt-manager.changes        
2017-12-05 01:30:43.420240141 +0100
+++ /work/SRC/openSUSE:Factory/.virt-manager.new/virt-manager.changes   
2017-12-08 13:02:11.707268513 +0100
@@ -1,0 +2,16 @@
+Thu Dec  7 12:41:25 UTC 2017 - [email protected]
+
+- bsc#1070896 - virt-manager will not run on a python3 only system
+  remove obsolete python-gconf dependency. This one was also pulling
+  python2.
+
+-------------------------------------------------------------------
+Thu Dec  7 11:49:29 UTC 2017 - [email protected]
+
+- More fixes for python3 (bsc#1070896)
+  0001-virtinst-python3-terminal-width-should-be-int.patch
+  0002-virtinst-python3-avoid-comparison-of-None-and-int.patch
+  0003-virtinst-python3-avoid-using-long-type.patch
+  0004-virtinst-python3-use-binary-mode-for-kernel.patch
+
+-------------------------------------------------------------------
@@ -1163,6 +1178,0 @@
-- Fix GUI failure to display addition of a second disk
-  Dropped virtman-device-flags.patch
-
--------------------------------------------------------------------
-Wed Jul  9 09:50:14 MDT 2014 - [email protected]
-
@@ -1534,13 +1543,0 @@
-
--------------------------------------------------------------------
-Fri Mar 14 11:33:09 MDT 2014 - [email protected]
-
-- For Xen always have the arch expander expanded.
-- For Xen and KVM default to Network install if host was installed
-  from the network
-- Default to a bridge with an actual inet address if available
-  virtinst-modify-gui-defaults.patch
-- We are not supporting PV ISO installs with virt-install.
-  Drop the following patches
-  virtinst-allow-pv-iso-install.patch
-  virtman-allow-pv-iso-install.patc

New:
----
  0001-virtinst-python3-terminal-width-should-be-int.patch
  0002-virtinst-python3-avoid-comparison-of-None-and-int.patch
  0003-virtinst-python3-avoid-using-long-type.patch
  0004-virtinst-python3-use-binary-mode-for-kernel.patch

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

Other differences:
------------------
++++++ virt-manager.spec ++++++
--- /var/tmp/diff_new_pack.SMh2YA/_old  2017-12-08 13:02:13.499203797 +0100
+++ /var/tmp/diff_new_pack.SMh2YA/_new  2017-12-08 13:02:13.503203652 +0100
@@ -122,6 +122,11 @@
 Patch203:       virtinst-python2-to-python3-conversion.patch
 Patch204:       virtman-python2-to-python3-conversion.patch
 Patch205:       virttests-python2-to-python3-conversion.patch
+Patch206:       0001-virtinst-python3-terminal-width-should-be-int.patch
+Patch207:       0002-virtinst-python3-avoid-comparison-of-None-and-int.patch
+Patch208:       0003-virtinst-python3-avoid-using-long-type.patch
+Patch209:       0004-virtinst-python3-use-binary-mode-for-kernel.patch
+
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
@@ -129,7 +134,6 @@
 Requires:       dbus-1-x11
 Requires:       dconf
 Requires:       gtk3
-Requires:       python-gconf
 Requires:       python3-gobject-Gdk
 # For console widget
 Requires:       python3-gobject-cairo
@@ -289,6 +293,10 @@
 %patch203 -p1
 %patch204 -p1
 %patch205 -p1
+%patch206 -p1
+%patch207 -p1
+%patch208 -p1
+%patch209 -p1
 
 %build
 %if %{qemu_user}

++++++ 0001-virtinst-python3-terminal-width-should-be-int.patch ++++++
>From 79fa0f9de08f766dee6129fdc2c48648bba6fc6e Mon Sep 17 00:00:00 2001
From: Martin Wilck <[email protected]>
Date: Thu, 7 Dec 2017 11:09:02 +0100
Subject: [PATCH 1/4] virtinst: python3: terminal width should be int

This avoids errors like this:

File "/usr/share/virt-manager/virtinst/progress.py", line 224, in _term_add_bar
    return tl.add(' [%-*.*s]' % (blen, blen, bar))
  TypeError: * wants int
---
 virtinst/progress.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virtinst/progress.py b/virtinst/progress.py
index 868d0f0f0544..e07591a14fa0 100644
--- a/virtinst/progress.py
+++ b/virtinst/progress.py
@@ -79,7 +79,7 @@ class TerminalLine:
             a number of different elements (default=2). """
         if self._llen < fixed:
             return 0
-        return (self._llen - fixed) / elements
+        return int((self._llen - fixed) / elements)
 
     def add(self, element, full_len=None):
         """ If there is room left in the line, above min_len, add element.
-- 
2.15.1

++++++ 0002-virtinst-python3-avoid-comparison-of-None-and-int.patch ++++++
>From cb90bbc8671aa25e23e55341745cc2682547e5f0 Mon Sep 17 00:00:00 2001
From: Martin Wilck <[email protected]>
Date: Thu, 7 Dec 2017 11:17:03 +0100
Subject: [PATCH 2/4] virtinst: python3: avoid comparison of None and int

This avoids the following error in python3:

  File "/usr/share/virt-manager/virtinst/progress.py", line 249, in _do_update
    ave_dl = format_number(self.re.average_rate())
  File "/usr/share/virt-manager/virtinst/progress.py", line 481, in 
format_number
    while number > thresh and depth < max_depth:
TypeError: '>' not supported between instances of 'NoneType' and 'int'
---
 virtinst/progress.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/virtinst/progress.py b/virtinst/progress.py
index e07591a14fa0..eef3f7613506 100644
--- a/virtinst/progress.py
+++ b/virtinst/progress.py
@@ -339,7 +339,7 @@ class RateEstimator:
         self.start_time = now
         self.last_update_time = now
         self.last_amount_read = 0
-        self.ave_rate = None
+        self.ave_rate = 0
 
     def update(self, amount_read, now=None):
         if now is None: now = time.time()
@@ -351,7 +351,7 @@ class RateEstimator:
             # if we just started this file, all bets are off
             self.last_update_time = now
             self.last_amount_read = amount_read
-            self.ave_rate = None
+            self.ave_rate = 0
             return
 
         #print 'times', now, self.last_update_time
-- 
2.15.1

++++++ 0003-virtinst-python3-avoid-using-long-type.patch ++++++
>From 955c4f03d623461c4e06d9f39eea7ac305104b0a Mon Sep 17 00:00:00 2001
From: Martin Wilck <[email protected]>
Date: Thu, 7 Dec 2017 11:21:21 +0100
Subject: [PATCH 3/4] virtinst: python3: avoid using long type

Avoids the following error:

  File "/usr/share/virt-manager/virtinst/progress.py", line 484, in 
format_number
    if isinstance(number, int) or isinstance(number, long):
  NameError: name 'long' is not defined
---
 virtinst/progress.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/virtinst/progress.py b/virtinst/progress.py
index eef3f7613506..bea4fad98938 100644
--- a/virtinst/progress.py
+++ b/virtinst/progress.py
@@ -30,6 +30,7 @@ import math
 import fcntl
 import struct
 import termios
+from six import integer_types
 
 # Code from http://mail.python.org/pipermail/python-list/2000-May/033365.html
 def terminal_width(fd=1):
@@ -481,7 +482,7 @@ def format_number(number, SI=0, space=' '):
         depth  = depth + 1
         number = number / step
 
-    if isinstance(number, int) or isinstance(number, int):
+    if isinstance(number, integer_types):
         # it's an int or a long, which means it didn't get divided,
         # which means it's already short enough
         fmt = '%i%s%s'
-- 
2.15.1

++++++ 0004-virtinst-python3-use-binary-mode-for-kernel.patch ++++++
>From 1e38d32429205ed8fbd088bcfe2dfea4229544b6 Mon Sep 17 00:00:00 2001
From: Martin Wilck <[email protected]>
Date: Thu, 7 Dec 2017 12:42:45 +0100
Subject: [PATCH 4/4] virtinst: python3: use binary mode for kernel

This avoids the following error:

  File "/usr/share/virt-manager/virtinst/kernelupload.py", line 146, in 
upload_kernel_initrd
    kvol = _upload_file(conn, meter, pool, kernel)
  File "/usr/share/virt-manager/virtinst/kernelupload.py", line 105, in 
_upload_file
    data = fileobj.read(blocksize)
  File "/usr/lib64/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xea in position 2: invalid 
continuation byte
---
 virtinst/kernelupload.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virtinst/kernelupload.py b/virtinst/kernelupload.py
index 80bb9c6d1143..5caeb51c4100 100644
--- a/virtinst/kernelupload.py
+++ b/virtinst/kernelupload.py
@@ -93,7 +93,7 @@ def _upload_file(conn, meter, destpool, src):
         vol.upload(stream, offset, length, flags)
 
         # Open source file
-        fileobj = open(src, "r")
+        fileobj = open(src, "rb")
 
         # Start transfer
         total = 0
-- 
2.15.1


Reply via email to