virt-manager/virtinst-sap-detection.patch
Charles Arnold b5bcf7ffeb - bsc#1179236 - L3: virt-install: "Error validating install
location: invalid literal for int() with base 10" reported by
  virt-install ref:_00D1igLOd._5001iTe00n:ref
  virtinst-sap-detection.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=529
2020-11-30 22:06:09 +00:00

24 lines
1.1 KiB
Diff

Index: virt-manager-3.2.0/virtinst/install/urldetect.py
===================================================================
--- virt-manager-3.2.0.orig/virtinst/install/urldetect.py
+++ virt-manager-3.2.0/virtinst/install/urldetect.py
@@ -271,9 +271,16 @@ class _SUSEContent(object):
distro_version = distro_version.strip()
if "Enterprise" in self.product_name or "SLES" in self.product_name:
- sle_version = self.product_name.strip().rsplit(' ')[4]
+ if " SAP " in self.product_name:
+ sle_version = self.product_name.strip().rsplit(' ')[7]
+ else:
+ sle_version = self.product_name.strip().rsplit(' ')[4]
if len(self.product_name.strip().rsplit(' ')) > 5:
- sle_version = (sle_version + '.' +
+ if " SAP " in self.product_name:
+ sle_version = (sle_version + '.' +
+ self.product_name.strip().rsplit(' ')[8][2])
+ else:
+ sle_version = (sle_version + '.' +
self.product_name.strip().rsplit(' ')[5][2])
distro_version = sle_version