- Fallback to latest version of openSUSE when opensuse-unknown is
detected for the ISO (bsc#1085757) virtinst-use-latest-opensuse-version-when-unknown-media.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=419
This commit is contained in:
parent
836ba3051d
commit
10990f582a
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 29 09:06:00 MDT 2018 - carnold@suse.com
|
||||||
|
|
||||||
|
- Fallback to latest version of openSUSE when opensuse-unknown is
|
||||||
|
detected for the ISO (bsc#1085757)
|
||||||
|
virtinst-use-latest-opensuse-version-when-unknown-media.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Mar 22 15:35:57 MDT 2018 - carnold@suse.com
|
Thu Mar 22 15:35:57 MDT 2018 - carnold@suse.com
|
||||||
|
|
||||||
|
@ -85,6 +85,7 @@ Patch169: virtinst-keep-install-iso-attached.patch
|
|||||||
Patch170: virtinst-osdict-get_supported.patch
|
Patch170: virtinst-osdict-get_supported.patch
|
||||||
Patch171: virtinst-dont-use-special-copy-cpu-features.patch
|
Patch171: virtinst-dont-use-special-copy-cpu-features.patch
|
||||||
Patch172: virtinst-dont-set-cpu-model-when-caps-mismatch.patch
|
Patch172: virtinst-dont-set-cpu-model-when-caps-mismatch.patch
|
||||||
|
Patch173: virtinst-use-latest-opensuse-version-when-unknown-media.patch
|
||||||
# Python2 to Python3 patches
|
# Python2 to Python3 patches
|
||||||
Patch200: virtmisc-python2-to-python3-conversion.patch
|
Patch200: virtmisc-python2-to-python3-conversion.patch
|
||||||
Patch201: virtcli-python2-to-python3-conversion.patch
|
Patch201: virtcli-python2-to-python3-conversion.patch
|
||||||
@ -227,6 +228,7 @@ machine).
|
|||||||
%patch170 -p1
|
%patch170 -p1
|
||||||
%patch171 -p1
|
%patch171 -p1
|
||||||
%patch172 -p1
|
%patch172 -p1
|
||||||
|
%patch173 -p1
|
||||||
# Python2 to Python3 patches
|
# Python2 to Python3 patches
|
||||||
%patch200 -p1
|
%patch200 -p1
|
||||||
%patch201 -p1
|
%patch201 -p1
|
||||||
|
@ -92,7 +92,7 @@ Index: virt-manager-1.5.0/virtinst/osdict.py
|
|||||||
sorted_distro_list.sort()
|
sorted_distro_list.sort()
|
||||||
sortpref.reverse()
|
sortpref.reverse()
|
||||||
for prefer in sortpref:
|
for prefer in sortpref:
|
||||||
@@ -258,7 +258,7 @@ class _OSDB(object):
|
@@ -264,7 +264,7 @@ class _OSDB(object):
|
||||||
"""
|
"""
|
||||||
sortmap = {}
|
sortmap = {}
|
||||||
|
|
||||||
|
@ -0,0 +1,41 @@
|
|||||||
|
References: bsc#1085757
|
||||||
|
|
||||||
|
When a version openSUSE is under development, the lookup fails to
|
||||||
|
detect the version of openSUSE ISO media (it changes with every build).
|
||||||
|
When 'opensuse-unknown' is detected, look up the most current version
|
||||||
|
of openSUSE and default to that. This is the same way fedora does it.
|
||||||
|
|
||||||
|
Index: virt-manager-1.5.0/virtinst/osdict.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.5.0.orig/virtinst/osdict.py
|
||||||
|
+++ virt-manager-1.5.0/virtinst/osdict.py
|
||||||
|
@@ -241,6 +241,12 @@ class _OSDB(object):
|
||||||
|
"Converting that to the latest fedora OS version=%s",
|
||||||
|
location, osname)
|
||||||
|
|
||||||
|
+ if osname == "opensuse-unknown":
|
||||||
|
+ osname = self.latest_opensuse_version()
|
||||||
|
+ logging.debug("Detected location=%s as os=opensuse-unknown. "
|
||||||
|
+ "Converting that to the latest opensuse OS version=%s",
|
||||||
|
+ location, osname)
|
||||||
|
+
|
||||||
|
return osname
|
||||||
|
|
||||||
|
def list_types(self):
|
||||||
|
@@ -275,6 +281,16 @@ class _OSDB(object):
|
||||||
|
# First fedora* occurrence should be the newest
|
||||||
|
return osinfo.name
|
||||||
|
|
||||||
|
+ def latest_opensuse_version(self):
|
||||||
|
+ os_info = None
|
||||||
|
+ for osinfo in self.list_os():
|
||||||
|
+ if (osinfo.name.startswith("opensuse") and
|
||||||
|
+ "unknown" not in osinfo.name and
|
||||||
|
+ "tumbleweed" not in osinfo.name and
|
||||||
|
+ "factory" not in osinfo.name and
|
||||||
|
+ "42" not in osinfo.name):
|
||||||
|
+ # openSUSE Leap 42 is not the latest anymore
|
||||||
|
+ return osinfo.name
|
||||||
|
|
||||||
|
#####################
|
||||||
|
# OsVariant classes #
|
Loading…
Reference in New Issue
Block a user