Hello community, here is the log from the commit of package virt-manager for openSUSE:Factory checked in at 2017-12-21 11:29:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/virt-manager (Old) and /work/SRC/openSUSE:Factory/.virt-manager.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "virt-manager" Thu Dec 21 11:29:56 2017 rev:165 rq:558884 version:1.4.3 Changes: -------- --- /work/SRC/openSUSE:Factory/virt-manager/virt-manager.changes 2017-12-20 10:39:53.142898759 +0100 +++ /work/SRC/openSUSE:Factory/.virt-manager.new/virt-manager.changes 2017-12-21 11:30:08.129232596 +0100 @@ -1,0 +2,19 @@ +Wed Dec 20 08:31:19 UTC 2017 - cbosdon...@suse.com + +- Get rid of "TypeError: Couldn't find foreign struct converter for + 'cairo.Context'" errors by adding a dependency to python3-cairo. + (bsc#1062865) +- Python3: Fix 'local variable 'e' referenced before assignment' + 0001-py3-store-exception-variables-for-use-outside-except.patch + (bsc#1073594) + +------------------------------------------------------------------- +Tue Dec 19 10:44:40 MST 2017 - carn...@suse.com + +- Fix TypeError in inspection.py (bsc#1070896) + virtman-python2-to-python3-conversion.patch +- Fix openSUSE 15.0 detection. It has no content file or .treeinfo + file (bsc#1054986) + virtinst-add-sle15-detection-support.patch + +------------------------------------------------------------------- New: ---- 0001-py3-store-exception-variables-for-use-outside-except.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ virt-manager.spec ++++++ --- /var/tmp/diff_new_pack.AIazaM/_old 2017-12-21 11:30:12.964996807 +0100 +++ /var/tmp/diff_new_pack.AIazaM/_new 2017-12-21 11:30:12.968996612 +0100 @@ -128,6 +128,7 @@ Patch209: 0004-virtinst-python3-use-binary-mode-for-kernel.patch Patch210: virtman-register-delete-event-for-details-dialog.patch Patch211: python3-fix-bytes-string-mess-in-serial-console.patch +Patch212: 0001-py3-store-exception-variables-for-use-outside-except.patch # For upstream review Patch500: 0001-Improve-container-image-url-example.patch Patch501: 0002-create-wizard-fix-alignment-in-os-container-page.patch @@ -143,6 +144,7 @@ Requires: gtk3 Requires: python3-gobject-Gdk # For console widget +Requires: python3-cairo Requires: python3-gobject-cairo Recommends: python3-SpiceClientGtk Requires: virt-install @@ -306,6 +308,7 @@ %patch209 -p1 %patch210 -p1 %patch211 -p1 +%patch212 -p1 %patch500 -p1 %patch501 -p1 %patch502 -p1 ++++++ 0001-py3-store-exception-variables-for-use-outside-except.patch ++++++ >From d4b7853b17bd24e0d15a6887b877a627da361589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdon...@suse.com> Date: Wed, 20 Dec 2017 09:38:18 +0100 Subject: [virt-manager][PATCH] py3: store exception variables for use outside except In python3 exceptions aren't defined outside the except block. Leading to 'UnboundLocalError: local variable 'e' referenced before assignment' errors. To work around this, store the local variable into one that will have a longer life. --- virtManager/connection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/virtManager/connection.py b/virtManager/connection.py index c98fff3d..f9da6677 100644 --- a/virtManager/connection.py +++ b/virtManager/connection.py @@ -1439,7 +1439,8 @@ class vmmConnection(vmmGObject): self._tick(*args, **kwargs) except KeyboardInterrupt: raise - except Exception as e: + except Exception as err: + e = err pass if e is None: -- 2.15.1 ++++++ virtinst-add-sle15-detection-support.patch ++++++ --- /var/tmp/diff_new_pack.AIazaM/_old 2017-12-21 11:30:13.240983350 +0100 +++ /var/tmp/diff_new_pack.AIazaM/_new 2017-12-21 11:30:13.240983350 +0100 @@ -44,7 +44,7 @@ dclass = SLESDistro if distro_version is None: distro_version = _parse_sle_distribution(distribution) -@@ -481,7 +497,7 @@ def _distroFromSUSEContent(fetcher, arch +@@ -481,10 +497,13 @@ def _distroFromSUSEContent(fetcher, arch dclass = CAASPDistro if distro_version is None: distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[6]] @@ -52,8 +52,15 @@ + elif re.match(".*openSUSE.*", distribution[1]) or re.match("openSUSE *", distribution[1]): dclass = OpensuseDistro if distro_version is None: - distro_version = ['VERSION', distribution[0].strip().rsplit(':')[4]] -@@ -1003,6 +1019,7 @@ class SLDistro(RHELDistro): +- distro_version = ['VERSION', distribution[0].strip().rsplit(':')[4]] ++ if ':' in distribution[0]: ++ distro_version = ['VERSION', distribution[0].strip().rsplit(':')[4]] ++ else: ++ distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[2]] + + if distro_version is None: + return None +@@ -1003,6 +1022,7 @@ class SLDistro(RHELDistro): class SuseDistro(Distro): name = "SUSE" @@ -61,7 +68,7 @@ _boot_iso_paths = ["boot/boot.iso"] -@@ -1040,8 +1057,11 @@ class SuseDistro(Distro): +@@ -1040,8 +1060,11 @@ class SuseDistro(Distro): self._xen_kernel_paths = [("boot/%s/vmlinuz-xenpae" % self.arch, "boot/%s/initrd-xenpae" % self.arch)] else: @@ -75,7 +82,7 @@ def _variantFromVersion(self): distro_version = self.version_from_content[1].strip() -@@ -1053,7 +1073,7 @@ class SuseDistro(Distro): +@@ -1053,7 +1076,7 @@ class SuseDistro(Distro): if len(distro_version.split('.', 1)) == 2: sp_version = 'sp' + distro_version.split('.', 1)[1].strip() self.os_variant += version @@ -84,7 +91,7 @@ self.os_variant += sp_version elif self.os_variant.startswith("opensuse"): if len(version) == 8: -@@ -1077,6 +1097,24 @@ class SuseDistro(Distro): +@@ -1077,6 +1100,24 @@ class SuseDistro(Distro): self.os_variant += "9" def isValidStore(self): @@ -109,7 +116,7 @@ # self.version_from_content is the VERSION line from the contents file if (not self.version_from_content or self.version_from_content[1] is None): -@@ -1128,8 +1166,6 @@ class OESDistro(SuseDistro): +@@ -1128,8 +1169,6 @@ class OESDistro(SuseDistro): urldistro = "oes" ++++++ virtinst-python2-to-python3-conversion.patch ++++++ --- /var/tmp/diff_new_pack.AIazaM/_old 2017-12-21 11:30:13.268981985 +0100 +++ /var/tmp/diff_new_pack.AIazaM/_new 2017-12-21 11:30:13.272981790 +0100 @@ -489,7 +489,7 @@ except: bbuf = ["x86_64"] cbuf = cbuf + "\n" + " ".join(bbuf) -@@ -618,7 +625,7 @@ class Distro(object): +@@ -621,7 +628,7 @@ class Distro(object): try: kernelpath = self._getTreeinfoMedia("kernel") initrdpath = self._getTreeinfoMedia("initrd") @@ -498,7 +498,7 @@ pass if not kernelpath or not initrdpath: -@@ -685,6 +692,7 @@ class Distro(object): +@@ -688,6 +695,7 @@ class Distro(object): # Fetch 'filename' and return True/False if it matches the regex try: content = self.fetcher.acquireFileContent(filename) @@ -506,7 +506,7 @@ except ValueError: return False -@@ -754,15 +762,15 @@ class GenericDistro(Distro): +@@ -757,15 +765,15 @@ class GenericDistro(Distro): self._valid_kernel_path = ( self._getTreeinfoMedia("kernel"), self._getTreeinfoMedia("initrd")) @@ -525,7 +525,7 @@ logging.debug(e) if self.type == "xen": -@@ -1437,7 +1445,7 @@ class ALTLinuxDistro(Distro): +@@ -1440,7 +1448,7 @@ class ALTLinuxDistro(Distro): # Build list of all *Distro classes def _build_distro_list(): allstores = [] ++++++ virtman-python2-to-python3-conversion.patch ++++++ --- /var/tmp/diff_new_pack.AIazaM/_old 2017-12-21 11:30:13.352977889 +0100 +++ /var/tmp/diff_new_pack.AIazaM/_new 2017-12-21 11:30:13.352977889 +0100 @@ -34,15 +34,35 @@ =================================================================== --- virt-manager-1.4.3.orig/virtManager/inspection.py +++ virt-manager-1.4.3/virtManager/inspection.py -@@ -17,7 +17,7 @@ +@@ -17,8 +17,9 @@ # MA 02110-1301 USA. # -from Queue import Queue +from queue import Queue from threading import Thread ++import functools import logging + from guestfs import GuestFS # pylint: disable=import-error +@@ -212,7 +213,7 @@ class vmmInspection(vmmGObject): + return 0 + else: + return -1 +- mps.sort(compare) ++ mps.sort(key=functools.cmp_to_key(compare)) + + for mp_dev in mps: + try: +@@ -263,7 +264,7 @@ class vmmInspection(vmmGObject): + data.product_name = str(product_name) + data.product_variant = str(product_variant) + data.icon = icon +- data.applications = list(apps) ++ data.applications = apps if apps is None else list(apps) + data.error = False + + return data Index: virt-manager-1.4.3/virtManager/systray.py =================================================================== --- virt-manager-1.4.3.orig/virtManager/systray.py