532a3213-pass-correct-connection-to-install.patch

532a3213-fix-url-autodetect-timeout.patch
  532a3213-exit-URL-detection-immediately-if-detection-fails.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=154
This commit is contained in:
Charles Arnold 2014-03-20 01:47:09 +00:00 committed by Git OBS Bridge
parent ff141f41a5
commit db55bd4269
11 changed files with 164 additions and 33 deletions

View File

@ -0,0 +1,93 @@
Subject: create: Exit URL detection immediately if detection fails
From: Cole Robinson crobinso@redhat.com Wed Mar 19 20:09:58 2014 -0400
Date: Wed Mar 19 20:10:59 2014 -0400:
Git: 633669ed31c7079d79a503650aec63e6fc3cac2f
Index: virt-manager-1.0.0/virtManager/create.py
===================================================================
--- virt-manager-1.0.0.orig/virtManager/create.py
+++ virt-manager-1.0.0/virtManager/create.py
@@ -44,6 +44,8 @@ from virtManager.addstorage import vmmAd
# Number of seconds to wait for media detection
DETECT_TIMEOUT = 20
+DETECT_INPROGRESS = -1
+DETECT_FAILED = -2
DEFAULT_MEM = 1024
@@ -93,8 +95,7 @@ class vmmCreate(vmmGObjectUI):
self.storage_browser = None
# Distro detection state variables
- self.detectedDistro = -1
- self.detecting = False
+ self.detectedDistro = None
self.mediaDetected = False
self.show_all_os = False
@@ -1113,11 +1114,13 @@ class vmmCreate(vmmGObjectUI):
self.change_caps(self.capsguest.os_type, arch)
def url_box_changed(self, ignore):
+ self.mediaDetected = False
+
# If the url_entry has focus, don't fire detect_media_os, it means
# the user is probably typing
- self.mediaDetected = False
if self.widget("install-url-box").get_child().has_focus():
return
+
self.detect_media_os()
def should_detect_media(self):
@@ -1917,7 +1920,8 @@ class vmmCreate(vmmGObjectUI):
try:
base = _("Detecting")
- if (self.detectedDistro == -1) and (idx < (DETECT_TIMEOUT * 2)):
+ if (self.detectedDistro == DETECT_INPROGRESS and
+ (idx < (DETECT_TIMEOUT * 2))):
detect_str = base + ("." * ((idx % 3) + 1))
self.set_distro_labels(detect_str, detect_str)
@@ -1929,25 +1933,25 @@ class vmmCreate(vmmGObjectUI):
except:
logging.exception("Error in distro detect timeout")
- if results == -1:
+ if results in [DETECT_INPROGRESS, DETECT_FAILED]:
results = None
+
self.widget("create-forward").set_sensitive(True)
self.mediaDetected = True
- self.detecting = False
logging.debug("Finished OS detection.")
self.set_distro_selection(results)
if forward:
self.idle_add(self.forward, ())
def start_detection(self, forward):
- if self.detecting:
+ if self.detectedDistro == DETECT_INPROGRESS:
return
media = self.get_config_detectable_media()
if not media:
return
- self.detectedDistro = -1
+ self.detectedDistro = DETECT_INPROGRESS
logging.debug("Starting OS detection thread for media=%s", media)
self.widget("create-forward").set_sensitive(False)
@@ -1968,7 +1972,7 @@ class vmmCreate(vmmGObjectUI):
self.detectedDistro = installer.detect_distro(self.guest)
except:
logging.exception("Error detecting distro.")
- self.detectedDistro = -1
+ self.detectedDistro = DETECT_FAILED
def _browse_file_cb(self, ignore, widget):
self._browse_file(widget)

View File

@ -0,0 +1,24 @@
Subject: create: Fix URL autodetect timeout detection
From: Charles Arnold carnold@suse.com Wed Mar 19 16:26:52 2014 -0600
Date: Wed Mar 19 20:10:59 2014 -0400:
Git: f113a8db29ea3d8a4080f767d2fc6f5e8488eb09
When 'Network Install' is selected and a malformed url is entered in the
'URL:' box virt-manager will hang forever 'Detecting...'. For example,
leave the 'http://' off the url when 'Automatically detect...' is enabled.
Signed-off-by: Charles Arnold <carnold@suse.com>
Index: virt-manager-1.0.0/virtManager/create.py
===================================================================
--- virt-manager-1.0.0.orig/virtManager/create.py
+++ virt-manager-1.0.0/virtManager/create.py
@@ -1917,7 +1917,7 @@ class vmmCreate(vmmGObjectUI):
try:
base = _("Detecting")
- if (self.detectedDistro == -1) or (idx >= (DETECT_TIMEOUT * 2)):
+ if (self.detectedDistro == -1) and (idx < (DETECT_TIMEOUT * 2)):
detect_str = base + ("." * ((idx % 3) + 1))
self.set_distro_labels(detect_str, detect_str)

View File

@ -0,0 +1,19 @@
Subject: create: Pass correct connection to install for detection
From: Cole Robinson crobinso@redhat.com Wed Mar 19 19:56:19 2014 -0400
Date: Wed Mar 19 20:10:59 2014 -0400:
Git: bd27910b6f77275b4e82cd2dae247e72d9489b1d
Index: virt-manager-1.0.0/virtManager/create.py
===================================================================
--- virt-manager-1.0.0.orig/virtManager/create.py
+++ virt-manager-1.0.0/virtManager/create.py
@@ -1962,7 +1962,7 @@ class vmmCreate(vmmGObjectUI):
def actually_detect(self, media):
try:
- installer = virtinst.DistroInstaller(self.conn)
+ installer = virtinst.DistroInstaller(self.conn.get_backend())
installer.location = media
self.detectedDistro = installer.detect_distro(self.guest)

View File

@ -2,7 +2,9 @@
Wed Mar 19 13:12:57 MDT 2014 - carnold@suse.com
- bnc#868194 - virt-manager gets stuck with some netinst urls
virtinst-check-detection-timeout-fix.patch
532a3213-pass-correct-connection-to-install.patch
532a3213-fix-url-autodetect-timeout.patch
532a3213-exit-URL-detection-immediately-if-detection-fails.patch
- bnc#869208 - virt-manager create new virtual machine fail
virtman-show-suse-install-repos.patch
- bnc#869181 - virt-manager: vm wizard -Error launching manager:

View File

@ -68,6 +68,9 @@ Patch29: 5321d3cd-virtinst-drop-cpu_map-parsing-of-arch-features.patch
Patch30: 5321d3d0-virtinst-drop-parsing-of-cpu-features.patch
Patch31: 5321f256-virtinst-use-libvirt-getCPUModelNames.patch
Patch32: 532255b4-unselect_all-members-before-clear-model.patch
Patch33: 532a3213-pass-correct-connection-to-install.patch
Patch34: 532a3213-fix-url-autodetect-timeout.patch
Patch35: 532a3213-exit-URL-detection-immediately-if-detection-fails.patch
Patch50: virtman-desktop.patch
Patch51: virtman-cdrom.patch
Patch52: virtman-kvm.patch
@ -94,16 +97,15 @@ Patch153: virtinst-support-suse-distros.patch
Patch154: virtinst-detect-suse-distros.patch
Patch155: virtinst-xen-drive-type.patch
Patch156: virtinst-modify-gui-defaults.patch
Patch157: virtinst-check-detection-timeout-fix.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define verrel %{version}-%{release}
Requires: virt-manager-common = %{verrel}
Requires: dbus-1-x11
Requires: dconf
Requires: gtk3
Requires: python-gconf
Requires: dconf
Requires: dbus-1-x11
Requires: virt-manager-common = %{verrel}
Requires: vm-install >= 0.5.6
# Libvirt-glib
@ -118,12 +120,12 @@ Requires: typelib-1_0-Vte-2_90
Requires: gtk-vnc2
Requires: libspice-client-glib-2_0-8
Requires: libspice-client-gtk-3_0-4
Requires: python-gobject-cairo
Requires: typelib-1_0-GVnc-1_0
Requires: typelib-1_0-Gtk-3_0
Requires: typelib-1_0-GtkVnc-2_0
Requires: typelib-1_0-SpiceClientGlib-2_0
Requires: typelib-1_0-SpiceClientGtk-3_0
Requires: typelib-1_0-Gtk-3_0
Requires: typelib-1_0-GVnc-1_0
Requires: typelib-1_0-GtkVnc-2_0
Requires: python-gobject-cairo
Recommends: python-SpiceClientGtk
Requires: virt-install
@ -152,9 +154,9 @@ Group: System/Monitoring
# This version not strictly required: virt-manager should work with older,
# however varying amounts of functionality will not be enabled.
Requires: libvirt-python >= 0.7.0
Requires: python-urlgrabber
Requires: python-ipaddr
Requires: python-libxml2
Requires: python-urlgrabber
%description common
Common files used by the different virt-manager interfaces, as well as
@ -167,10 +169,10 @@ Group: System/Monitoring
Requires: virt-manager-common = %{verrel}
Provides: virt-clone
Provides: virt-image
Provides: virt-convert
Provides: python-virtinst
Provides: virt-clone
Provides: virt-convert
Provides: virt-image
Obsoletes: python-virtinst <= 0.600.4
Supplements: virt-manager
@ -214,6 +216,9 @@ machine).
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch50 -p1
%patch51 -p1
%patch52 -p1
@ -240,7 +245,6 @@ machine).
%patch154 -p1
%patch155 -p1
%patch156 -p1
%patch157 -p1
%build
%if %{qemu_user}

View File

@ -1,11 +0,0 @@
--- virt-manager-1.0.0/virtManager/create.py.orig 2014-03-19 15:55:26.000000000 -0600
+++ virt-manager-1.0.0/virtManager/create.py 2014-03-19 15:56:17.000000000 -0600
@@ -2020,7 +2020,7 @@ class vmmCreate(vmmGObjectUI):
try:
base = _("Detecting")
- if (self.detectedDistro == -1) or (idx >= (DETECT_TIMEOUT * 2)):
+ if (self.detectedDistro == -1) and (idx < (DETECT_TIMEOUT * 2)):
detect_str = base + ("." * ((idx % 3) + 1))
self.set_distro_labels(detect_str, detect_str)

View File

@ -2,7 +2,7 @@ Index: virt-manager-1.0.0/virtManager/create.py
===================================================================
--- virt-manager-1.0.0.orig/virtManager/create.py
+++ virt-manager-1.0.0/virtManager/create.py
@@ -337,7 +337,18 @@ class vmmCreate(vmmGObjectUI):
@@ -338,7 +338,18 @@ class vmmCreate(vmmGObjectUI):
self.widget("method-local").set_active(True)
self.widget("create-conn").set_active(-1)
activeconn = self.populate_conn_list(urihint)

View File

@ -2,7 +2,7 @@ Index: virt-manager-1.0.0/virtManager/create.py
===================================================================
--- virt-manager-1.0.0.orig/virtManager/create.py
+++ virt-manager-1.0.0/virtManager/create.py
@@ -1217,11 +1217,34 @@ class vmmCreate(vmmGObjectUI):
@@ -1220,11 +1220,34 @@ class vmmCreate(vmmGObjectUI):
variant = self.widget("install-os-version")
variant.set_active(0)
@ -37,7 +37,7 @@ Index: virt-manager-1.0.0/virtManager/create.py
# Get previous
type_row = self._selected_os_row()
if not type_row:
@@ -1576,7 +1599,10 @@ class vmmCreate(vmmGObjectUI):
@@ -1579,7 +1602,10 @@ class vmmCreate(vmmGObjectUI):
if extra:
extraargs += extra
if ks:
@ -49,7 +49,7 @@ Index: virt-manager-1.0.0/virtManager/create.py
if extraargs:
self.guest.installer.extraargs = extraargs
@@ -1969,6 +1995,7 @@ class vmmCreate(vmmGObjectUI):
@@ -1972,6 +1998,7 @@ class vmmCreate(vmmGObjectUI):
dl = self.set_os_val(self.widget("install-os-type"), distro_type)
vl = self.set_os_val(self.widget("install-os-version"), distro_var)
self.set_distro_labels(dl, vl)

View File

@ -11,7 +11,7 @@ Index: virt-manager-1.0.0/virtManager/create.py
# pylint: disable=E0611
from gi.repository import GObject
@@ -1130,6 +1132,55 @@ class vmmCreate(vmmGObjectUI):
@@ -1133,6 +1135,55 @@ class vmmCreate(vmmGObjectUI):
return
self.start_detection(forward=forward)
@ -67,7 +67,7 @@ Index: virt-manager-1.0.0/virtManager/create.py
def toggle_detect_os(self, src):
dodetect = src.get_active()
@@ -1141,6 +1192,8 @@ class vmmCreate(vmmGObjectUI):
@@ -1144,6 +1195,8 @@ class vmmCreate(vmmGObjectUI):
if dodetect:
self.mediaDetected = False
self.detect_media_os()

View File

@ -2,7 +2,7 @@ Index: virt-manager-1.0.0/virtManager/create.py
===================================================================
--- virt-manager-1.0.0.orig/virtManager/create.py
+++ virt-manager-1.0.0/virtManager/create.py
@@ -855,7 +855,12 @@ class vmmCreate(vmmGObjectUI):
@@ -856,7 +856,12 @@ class vmmCreate(vmmGObjectUI):
# If none specified, prefer HVM. This way, the default install
# options won't be limited because we default to PV. If hvm not
# supported, differ to guest_lookup

View File

@ -10,7 +10,7 @@ Index: virt-manager-1.0.0/virtManager/create.py
import logging
import threading
import time
@@ -366,7 +367,13 @@ class vmmCreate(vmmGObjectUI):
@@ -367,7 +368,13 @@ class vmmCreate(vmmGObjectUI):
self.widget("install-url-options").set_expanded(False)
urlmodel = self.widget("install-url-box").get_model()
ksmodel = self.widget("install-ks-box").get_model()