d125800c6b
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=439
44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
References: bsc#1054986
|
|
|
|
Index: virt-manager-2.0.0/virtinst/urldetect.py
|
|
===================================================================
|
|
--- virt-manager-2.0.0.orig/virtinst/urldetect.py
|
|
+++ virt-manager-2.0.0/virtinst/urldetect.py
|
|
@@ -606,6 +606,10 @@ class SuseDistro(Distro):
|
|
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:
|
|
@@ -613,7 +617,10 @@ class SuseDistro(Distro):
|
|
# 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
|
|
@@ -630,6 +637,13 @@ class SuseDistro(Distro):
|
|
return "install"
|
|
|
|
|
|
+class SLEDistro(SuseDistro):
|
|
+ PRETTY_NAME = "SLE"
|
|
+ _variant_prefix = "sle"
|
|
+ _suse_regex = ["SUSE Linux Enterprise$"]
|
|
+ famregex = "SUSE Linux Enterprise$"
|
|
+
|
|
+
|
|
class SLESDistro(SuseDistro):
|
|
PRETTY_NAME = "SLES"
|
|
matching_distros = ["sles"]
|