- bsc#1056028 - Not able to install OES2018 as guest on Xen
virtinst-detect-oes-distros.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=362
This commit is contained in:
parent
4f78e3544f
commit
babbbf68b4
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 29 15:47:17 MDT 2017 - carnold@suse.com
|
||||
|
||||
- bsc#1056028 - Not able to install OES2018 as guest on Xen
|
||||
virtinst-detect-oes-distros.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 25 15:09:50 MDT 2017 - carnold@suse.com
|
||||
|
||||
|
@ -5,9 +5,9 @@ Index: virt-manager-1.4.2/virtinst/urlfetcher.py
|
||||
--- virt-manager-1.4.2.orig/virtinst/urlfetcher.py
|
||||
+++ virt-manager-1.4.2/virtinst/urlfetcher.py
|
||||
@@ -466,6 +466,10 @@ def _distroFromSUSEContent(fetcher, arch
|
||||
dclass = SLESDistro
|
||||
dclass = OESDistro
|
||||
if distro_version is None:
|
||||
distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[4]]
|
||||
distro_version = _parse_sle_distribution(distribution)
|
||||
+ elif re.match(".*SUSE Container as a Service Platform*", distribution[1]):
|
||||
+ dclass = CAASPDistro
|
||||
+ if distro_version is None:
|
||||
@ -15,32 +15,22 @@ Index: virt-manager-1.4.2/virtinst/urlfetcher.py
|
||||
elif re.match(".*openSUSE.*", distribution[1]):
|
||||
dclass = OpensuseDistro
|
||||
if distro_version is None:
|
||||
@@ -1028,7 +1032,8 @@ class SuseDistro(Distro):
|
||||
distro_version = self.version_from_content[1].strip()
|
||||
version = distro_version.split('.', 1)[0].strip()
|
||||
self.os_variant = self.urldistro
|
||||
- if int(version) >= 10:
|
||||
+ version_int = int(version)
|
||||
+ if version_int >= 10:
|
||||
if self.os_variant.startswith(("sles", "sled")):
|
||||
sp_version = None
|
||||
if len(distro_version.split('.', 1)) == 2:
|
||||
@@ -1042,6 +1047,8 @@ class SuseDistro(Distro):
|
||||
self.os_variant += "tumbleweed"
|
||||
else:
|
||||
self.os_variant += distro_version
|
||||
+ elif version_int == 1 and self.os_variant.startswith("caasp"):
|
||||
@@ -1052,6 +1056,8 @@ class SuseDistro(Distro):
|
||||
self.os_variant += major_version + 'sp' + sp_version
|
||||
else:
|
||||
self.os_variant += major_version
|
||||
+ elif self.os_variant.startswith("caasp"):
|
||||
+ self.os_variant = "caasp"
|
||||
else:
|
||||
self.os_variant += "9"
|
||||
|
||||
@@ -1088,6 +1095,9 @@ class SLESDistro(SuseDistro):
|
||||
class SLEDDistro(SuseDistro):
|
||||
urldistro = "sled"
|
||||
@@ -1090,6 +1096,9 @@ class SuseDistro(Distro):
|
||||
return osobj.name
|
||||
return self.os_variant
|
||||
|
||||
+class CAASPDistro(SuseDistro):
|
||||
+ urldistro = "caasp"
|
||||
+
|
||||
|
||||
# Suse image store is harder - we fetch the kernel RPM and a helper
|
||||
# RPM and then munge bits together to generate a initrd
|
||||
class SLESDistro(SuseDistro):
|
||||
urldistro = "sles"
|
||||
|
@ -9,9 +9,63 @@ Index: virt-manager-1.4.2/virtinst/urlfetcher.py
|
||||
if distro_version is None:
|
||||
distro_version = _parse_sle_distribution(distribution)
|
||||
+ elif re.match(".*Open Enterprise Server*", distribution[1]):
|
||||
+ dclass = SLESDistro
|
||||
+ dclass = OESDistro
|
||||
+ if distro_version is None:
|
||||
+ distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[4]]
|
||||
+ distro_version = _parse_sle_distribution(distribution)
|
||||
elif re.match(".*openSUSE.*", distribution[1]):
|
||||
dclass = OpensuseDistro
|
||||
if distro_version is None:
|
||||
@@ -1018,20 +1022,30 @@ class SuseDistro(Distro):
|
||||
distro_version = self.version_from_content[1].strip()
|
||||
version = distro_version.split('.', 1)[0].strip()
|
||||
self.os_variant = self.urldistro
|
||||
- if int(version) >= 10:
|
||||
- if self.os_variant.startswith(("sles", "sled")):
|
||||
- sp_version = None
|
||||
- if len(distro_version.split('.', 1)) == 2:
|
||||
- sp_version = 'sp' + distro_version.split('.', 1)[1].strip()
|
||||
- self.os_variant += version
|
||||
- if sp_version:
|
||||
- self.os_variant += sp_version
|
||||
+
|
||||
+ sp_version = None
|
||||
+ if self.os_variant.startswith(("sles", "sled")):
|
||||
+ if len(distro_version.split('.', 1)) == 2:
|
||||
+ sp_version = 'sp' + distro_version.split('.', 1)[1].strip()
|
||||
+ self.os_variant += version
|
||||
+ if sp_version:
|
||||
+ self.os_variant += sp_version
|
||||
+ elif self.os_variant.startswith("opensuse"):
|
||||
+ if len(version) == 8:
|
||||
+ self.os_variant += "tumbleweed"
|
||||
else:
|
||||
- # Tumbleweed 8 digit date
|
||||
- if len(version) == 8:
|
||||
- self.os_variant += "tumbleweed"
|
||||
- else:
|
||||
- self.os_variant += distro_version
|
||||
+ self.os_variant += distro_version
|
||||
+ elif self.os_variant.startswith("oes"):
|
||||
+ versions = distro_version.split('.')
|
||||
+ major_version = versions[0]
|
||||
+ if len(versions) == 3:
|
||||
+ sp_version = versions[2]
|
||||
+ elif len(versions) == 2:
|
||||
+ sp_version = versions[1]
|
||||
+ if sp_version:
|
||||
+ self.os_variant += major_version + 'sp' + sp_version
|
||||
+ else:
|
||||
+ self.os_variant += major_version
|
||||
else:
|
||||
self.os_variant += "9"
|
||||
|
||||
@@ -1078,6 +1092,9 @@ class SLESDistro(SuseDistro):
|
||||
class SLEDDistro(SuseDistro):
|
||||
urldistro = "sled"
|
||||
|
||||
+class OESDistro(SuseDistro):
|
||||
+ urldistro = "oes"
|
||||
+
|
||||
|
||||
# Suse image store is harder - we fetch the kernel RPM and a helper
|
||||
# RPM and then munge bits together to generate a initrd
|
||||
|
@ -28,15 +28,3 @@ Index: virt-manager-1.4.2/virtinst/urlfetcher.py
|
||||
return ['VERSION', sle_version]
|
||||
|
||||
dclass = GenericDistro
|
||||
@@ -1036,7 +1047,10 @@ class SuseDistro(Distro):
|
||||
distro_version = self.version_from_content[1].strip()
|
||||
version = distro_version.split('.', 1)[0].strip()
|
||||
self.os_variant = self.urldistro
|
||||
- version_int = int(version)
|
||||
+ if version.isdigit():
|
||||
+ version_int = int(version)
|
||||
+ else:
|
||||
+ version_int = 12
|
||||
if version_int >= 10:
|
||||
if self.os_variant.startswith(("sles", "sled")):
|
||||
sp_version = None
|
||||
|
Loading…
Reference in New Issue
Block a user