virt-manager/virtman-autoyast-support.patch
Charles Arnold ae026a575b - Update to virt-manager 0.10.0
* Merged code with python-virtinst. virtinst is no longer public
  * Port from GTK2 to GTK3 (Daniel Berrange, Cole Robinson)
  * Port from gconf to gsettings
  * Port from autotools to python distutils
  * Remove virt-manager-tui
  * Remove HAL support
  * IPv6 and static route virtual network support (Gene Czarcinski)
  * virt-install: Add –cpu host-passthrough (Ken ICHIKAWA, Hu Tao)

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=129
2013-11-26 21:23:05 +00:00

74 lines
3.4 KiB
Diff

Index: virt-manager-0.10.0/virtManager/create.py
===================================================================
--- virt-manager-0.10.0.orig/virtManager/create.py
+++ virt-manager-0.10.0/virtManager/create.py
@@ -1237,12 +1237,35 @@ class vmmCreate(vmmGObjectUI):
variant = self.widget("install-os-version")
variant.set_active(0)
+ def _update_kickstart_label(self):
+ # Update label based on os version selected to either kickstart or autoyast
+ combo = self.widget("install-os-version")
+ if combo.get_active() != -1:
+ tree_iter = combo.get_active_iter()
+ if tree_iter != None:
+ model = combo.get_model()
+ unused, os_name = model[tree_iter][:2]
+ else:
+ entry = combo.get_child()
+ os_name = entry.get_text()
+ if os_name:
+ os_name = os_name.lower()
+ label = self.widget("kickstart-url-label")
+ if label and os_name:
+ if os_name.startswith('opensuse') or os_name.startswith('suse') or os_name.startswith('novell'):
+ label.set_text("AutoYaST URL:")
+ else:
+ label.set_text("Kickstart URL:")
+ label.show()
+
def change_os_version(self, box):
model = box.get_model()
idx = box.get_active()
if idx == -1:
return
+ self._update_kickstart_label()
+
# Get previous
os_type_list = self.widget("install-os-type")
os_type_model = os_type_list.get_model()
@@ -1633,7 +1656,10 @@ class vmmCreate(vmmGObjectUI):
if extra:
extraargs += extra
if ks:
- extraargs += " ks=%s" % ks
+ if variant.startswith('opensuse') or variant.startswith('sle') or variant.startswith('oes'):
+ extraargs += " autoyast=%s" % ks
+ else:
+ extraargs += " ks=%s" % ks
if extraargs:
self.guest.installer.extraargs = extraargs
@@ -2091,6 +2117,7 @@ class vmmCreate(vmmGObjectUI):
dl = self.set_os_val(self.widget("install-os-type"), distro)
vl = self.set_os_val(self.widget("install-os-version"), ver)
self.set_distro_labels(dl, vl)
+ self._update_kickstart_label()
def check_detection(self, idx, forward):
results = None
Index: virt-manager-0.10.0/ui/vmm-create.ui
===================================================================
--- virt-manager-0.10.0.orig/ui/vmm-create.ui
+++ virt-manager-0.10.0/ui/vmm-create.ui
@@ -825,7 +825,7 @@
<property name="column_spacing">6</property>
<property name="row_spacing">4</property>
<child>
- <object class="GtkLabel" id="label25">
+ <object class="GtkLabel" id="kickstart-url-label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>