virt-manager/virtinst-add-sle15-detection-support.patch
Charles Arnold 081f979e1e - 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
2019-04-09 16:37:08 +00:00

45 lines
1.6 KiB
Diff

References: bsc#1054986
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
@@ -589,6 +589,10 @@ class _SuseDistro(_RHELDistro):
if re.search("openSUSE Tumbleweed", self.cache.treeinfo_name):
return "opensusetumbleweed"
+ sp_version = False
+ if ' SP' in self.cache.treeinfo_version:
+ sp_version = True
+ self.cache.treeinfo_version = self.cache.treeinfo_version.replace(' SP', '.')
version, update = self.cache.split_version()
base = self._variant_prefix + str(version)
while update >= 0:
@@ -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'):
- tryvar += ".%s" % update
+ if sp_version:
+ tryvar += "sp%s" % update
+ else:
+ tryvar += ".%s" % update
if OSDB.lookup_os(tryvar):
return tryvar
update -= 1
@@ -610,6 +617,14 @@ class _SuseDistro(_RHELDistro):
return var
+class _SLEDistro(_SuseDistro):
+ PRETTY_NAME = "SLE"
+ matching_distros = ["sle"]
+ _variant_prefix = "sle"
+ _suse_regex = ["SUSE Linux Enterprise$"]
+ famregex = "SUSE Linux Enterprise$"
+
+
class _SLESDistro(_SuseDistro):
PRETTY_NAME = "SLES"
matching_distros = ["sles"]