diff --git a/virt-manager.changes b/virt-manager.changes index 4d2e89f0..3910116b 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Dec 19 10:44:40 MST 2017 - carnold@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 + ------------------------------------------------------------------- Wed Dec 13 10:50:04 UTC 2017 - cbosdonnat@suse.com diff --git a/virtinst-add-sle15-detection-support.patch b/virtinst-add-sle15-detection-support.patch index 2094a503..599e76c4 100644 --- a/virtinst-add-sle15-detection-support.patch +++ b/virtinst-add-sle15-detection-support.patch @@ -44,7 +44,7 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py 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 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py + 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 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py _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 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py 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 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py 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 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py # 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" diff --git a/virtinst-python2-to-python3-conversion.patch b/virtinst-python2-to-python3-conversion.patch index ef722426..407b588a 100644 --- a/virtinst-python2-to-python3-conversion.patch +++ b/virtinst-python2-to-python3-conversion.patch @@ -489,7 +489,7 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py 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 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py 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 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py 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 @@ Index: virt-manager-1.4.3/virtinst/urlfetcher.py 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 = [] diff --git a/virtman-python2-to-python3-conversion.patch b/virtman-python2-to-python3-conversion.patch index b96fee3e..27af5245 100644 --- a/virtman-python2-to-python3-conversion.patch +++ b/virtman-python2-to-python3-conversion.patch @@ -34,15 +34,35 @@ Index: virt-manager-1.4.3/virtManager/inspection.py =================================================================== --- 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