- Drop unneeded 0003-virtinst-python3-avoid-using-long-type.patch
Drop Requires on python3-six Refreshed several patches with minor line offset changes. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=467
This commit is contained in:
parent
2d558399a0
commit
081f979e1e
@ -1,35 +0,0 @@
|
||||
From 955c4f03d623461c4e06d9f39eea7ac305104b0a Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
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(-)
|
||||
|
||||
Index: virt-manager-2.1.0/virtinst/progress.py
|
||||
===================================================================
|
||||
--- virt-manager-2.1.0.orig/virtinst/progress.py
|
||||
+++ virt-manager-2.1.0/virtinst/progress.py
|
||||
@@ -16,6 +16,7 @@ import math
|
||||
import fcntl
|
||||
import struct
|
||||
import termios
|
||||
+from six import integer_types
|
||||
|
||||
|
||||
# Code from https://mail.python.org/pipermail/python-list/2000-May/033365.html
|
||||
@@ -506,7 +507,7 @@ def format_number(number, SI=0, space='
|
||||
depth = depth + 1
|
||||
number = number / step
|
||||
|
||||
- if 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'
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 9 10:21:29 MDT 2019 - carnold@suse.com
|
||||
|
||||
- Drop unneeded 0003-virtinst-python3-avoid-using-long-type.patch
|
||||
Drop Requires on python3-six
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 3 11:08:16 MDT 2019 - carnold@suse.com
|
||||
|
||||
|
@ -91,8 +91,7 @@ Patch201: virtinst-python2-to-python3-conversion.patch
|
||||
Patch202: virtman-python2-to-python3-conversion.patch
|
||||
Patch203: virttests-python2-to-python3-conversion.patch
|
||||
Patch204: 0002-virtinst-python3-avoid-comparison-of-None-and-int.patch
|
||||
Patch205: 0003-virtinst-python3-avoid-using-long-type.patch
|
||||
Patch206: virtman-register-delete-event-for-details-dialog.patch
|
||||
Patch205: virtman-register-delete-event-for-details-dialog.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -102,8 +101,6 @@ Requires: dbus-1-x11
|
||||
Requires: dconf
|
||||
Requires: gtk3
|
||||
Requires: python3-gobject-Gdk
|
||||
# Patch 0003-virtinst-python3-avoid-using-long-type.patch adds a python3-six dependency. Drop it when dropping the patch.
|
||||
Requires: python3-six
|
||||
# For console widget
|
||||
Requires: python3-cairo
|
||||
Requires: python3-gobject-cairo
|
||||
@ -235,7 +232,6 @@ machine).
|
||||
%patch203 -p1
|
||||
%patch204 -p1
|
||||
%patch205 -p1
|
||||
%patch206 -p1
|
||||
|
||||
%build
|
||||
%if %{default_hvs}
|
||||
|
@ -4,7 +4,7 @@ Index: virt-manager-2.1.0/virtinst/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-2.1.0.orig/virtinst/urldetect.py
|
||||
+++ virt-manager-2.1.0/virtinst/urldetect.py
|
||||
@@ -258,6 +258,12 @@ class _SUSEContent(object):
|
||||
@@ -267,6 +267,12 @@ class _SUSEContent(object):
|
||||
self.product_name.strip().rsplit(' ')[5][2])
|
||||
distro_version = sle_version
|
||||
|
||||
@ -17,7 +17,7 @@ Index: virt-manager-2.1.0/virtinst/urldetect.py
|
||||
return distro_version
|
||||
|
||||
|
||||
@@ -544,6 +550,9 @@ class _SuseDistro(_RHELDistro):
|
||||
@@ -553,6 +559,9 @@ class _SuseDistro(_RHELDistro):
|
||||
# Tumbleweed 8 digit date
|
||||
return "opensusetumbleweed"
|
||||
|
||||
@ -27,7 +27,7 @@ Index: virt-manager-2.1.0/virtinst/urldetect.py
|
||||
if int(version) < 10:
|
||||
return self._variant_prefix + "9"
|
||||
|
||||
@@ -616,6 +625,14 @@ class _OpensuseDistro(_SuseDistro):
|
||||
@@ -625,6 +634,14 @@ class _OpensuseDistro(_SuseDistro):
|
||||
famregex = ".*openSUSE.*"
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@ Index: virt-manager-2.1.0/virtinst/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-2.1.0.orig/virtinst/urldetect.py
|
||||
+++ virt-manager-2.1.0/virtinst/urldetect.py
|
||||
@@ -580,6 +580,10 @@ class _SuseDistro(_RHELDistro):
|
||||
@@ -589,6 +589,10 @@ class _SuseDistro(_RHELDistro):
|
||||
if re.search("openSUSE Tumbleweed", self.cache.treeinfo_name):
|
||||
return "opensusetumbleweed"
|
||||
|
||||
@ -15,7 +15,7 @@ Index: virt-manager-2.1.0/virtinst/urldetect.py
|
||||
version, update = self.cache.split_version()
|
||||
base = self._variant_prefix + str(version)
|
||||
while update >= 0:
|
||||
@@ -587,7 +591,10 @@ class _SuseDistro(_RHELDistro):
|
||||
@@ -596,7 +600,10 @@ class _SuseDistro(_RHELDistro):
|
||||
# SLE doesn't use '.0' for initial releases in
|
||||
# osinfo-db (sles11, sles12, etc)
|
||||
if update > 0 or not base.startswith('sle'):
|
||||
@ -27,7 +27,7 @@ Index: virt-manager-2.1.0/virtinst/urldetect.py
|
||||
if OSDB.lookup_os(tryvar):
|
||||
return tryvar
|
||||
update -= 1
|
||||
@@ -601,6 +608,14 @@ class _SuseDistro(_RHELDistro):
|
||||
@@ -610,6 +617,14 @@ class _SuseDistro(_RHELDistro):
|
||||
return var
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@ Index: virt-manager-2.1.0/virtinst/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-2.1.0.orig/virtinst/urldetect.py
|
||||
+++ virt-manager-2.1.0/virtinst/urldetect.py
|
||||
@@ -547,7 +547,7 @@ class _SuseDistro(_RHELDistro):
|
||||
@@ -556,7 +556,7 @@ class _SuseDistro(_RHELDistro):
|
||||
if int(version) < 10:
|
||||
return self._variant_prefix + "9"
|
||||
|
||||
@ -13,7 +13,7 @@ Index: virt-manager-2.1.0/virtinst/urldetect.py
|
||||
sp_version = ""
|
||||
if len(distro_version.split('.', 1)) == 2:
|
||||
sp_version = 'sp' + distro_version.split('.', 1)[1].strip()
|
||||
@@ -616,6 +616,14 @@ class _OpensuseDistro(_SuseDistro):
|
||||
@@ -625,6 +625,14 @@ class _OpensuseDistro(_SuseDistro):
|
||||
famregex = ".*openSUSE.*"
|
||||
|
||||
|
||||
|
@ -2,9 +2,11 @@ When both the content file and .treeinfo file are missing from the media
|
||||
look in the media.1/products and media.1/media files for information.
|
||||
Caasp 4.0 has not content or .treeinfo file on the media
|
||||
|
||||
--- virt-manager-2.1.0/virtinst/urldetect.py.orig 2019-03-13 15:34:14.489019082 -0600
|
||||
+++ virt-manager-2.1.0/virtinst/urldetect.py 2019-03-13 15:34:56.813552736 -0600
|
||||
@@ -485,8 +485,23 @@ class _SuseDistro(_RHELDistro):
|
||||
Index: virt-manager-2.1.0/virtinst/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-2.1.0.orig/virtinst/urldetect.py
|
||||
+++ virt-manager-2.1.0/virtinst/urldetect.py
|
||||
@@ -494,8 +494,23 @@ class _SuseDistro(_RHELDistro):
|
||||
cache.checked_for_suse_content = True
|
||||
content_str = cache.acquire_file_content("content")
|
||||
if content_str is None:
|
||||
|
@ -25,7 +25,7 @@ Index: virt-manager-2.1.0/virtinst/guest.py
|
||||
return True
|
||||
|
||||
return False
|
||||
@@ -601,7 +604,7 @@ class Guest(XMLBuilder):
|
||||
@@ -612,7 +615,7 @@ class Guest(XMLBuilder):
|
||||
self.add_device(dev)
|
||||
|
||||
def _add_default_video_device(self):
|
||||
@ -34,7 +34,7 @@ Index: virt-manager-2.1.0/virtinst/guest.py
|
||||
return
|
||||
if self.devices.video:
|
||||
return
|
||||
@@ -665,7 +668,7 @@ class Guest(XMLBuilder):
|
||||
@@ -676,7 +679,7 @@ class Guest(XMLBuilder):
|
||||
return
|
||||
if self.os.is_container() and not self.conn.is_vz():
|
||||
return
|
||||
|
@ -8,7 +8,7 @@ Index: virt-manager-2.1.0/virtinst/urldetect.py
|
||||
===================================================================
|
||||
--- virt-manager-2.1.0.orig/virtinst/urldetect.py
|
||||
+++ virt-manager-2.1.0/virtinst/urldetect.py
|
||||
@@ -530,9 +530,14 @@ class _SuseDistro(_RHELDistro):
|
||||
@@ -539,9 +539,14 @@ class _SuseDistro(_RHELDistro):
|
||||
|
||||
if self.type == "xen":
|
||||
# Matches Opensuse > 10.2 and sles 10
|
||||
|
@ -8,7 +8,7 @@ Index: virt-manager-2.1.0/virtinst/storage.py
|
||||
===================================================================
|
||||
--- virt-manager-2.1.0.orig/virtinst/storage.py
|
||||
+++ virt-manager-2.1.0/virtinst/storage.py
|
||||
@@ -617,6 +617,11 @@ class StorageVolume(_StorageObject):
|
||||
@@ -629,6 +629,11 @@ class StorageVolume(_StorageObject):
|
||||
return self._pool_xml.get_disk_type()
|
||||
file_type = property(_get_vol_type)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user