Fix windows media detection
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=253
This commit is contained in:
parent
a67df0f6e9
commit
f84708fe49
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package virt-manager
|
# spec file for package virt-manager
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -15,7 +15,6 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define with_guestfs 0
|
%define with_guestfs 0
|
||||||
%define askpass_package "openssh-askpass"
|
%define askpass_package "openssh-askpass"
|
||||||
%define qemu_user "qemu"
|
%define qemu_user "qemu"
|
||||||
@ -99,6 +98,7 @@ Requires: virt-manager-common = %{verrel}
|
|||||||
Requires: vm-install >= 0.5.6
|
Requires: vm-install >= 0.5.6
|
||||||
|
|
||||||
# Typelib's
|
# Typelib's
|
||||||
|
Recommends: typelib(AppIndicator3)
|
||||||
Requires: typelib(GVnc)
|
Requires: typelib(GVnc)
|
||||||
Requires: typelib(GtkVnc)
|
Requires: typelib(GtkVnc)
|
||||||
Requires: typelib(LibvirtGLib)
|
Requires: typelib(LibvirtGLib)
|
||||||
@ -116,7 +116,7 @@ Requires: python-libguestfs
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: glib2-devel
|
||||||
%if 0%{?suse_version} >= 1315
|
%if 0%{?suse_version} > 1315
|
||||||
BuildRequires: gobject-introspection
|
BuildRequires: gobject-introspection
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: intltool
|
BuildRequires: intltool
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
Enhancement to detect windows media. It is based solely upon
|
Enhancement to detect windows media. It is based solely upon
|
||||||
finding an autorun.inf file in the root of the installation source.
|
finding an autorun.inf file in the root of the installation source.
|
||||||
It only assumes windows, not the specific version of windows.
|
It only assumes windows, not the specific version of windows.
|
||||||
Index: virt-manager-1.2.0/virtinst/urlfetcher.py
|
Index: virt-manager-1.2.1/virtinst/urlfetcher.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- virt-manager-1.2.0.orig/virtinst/urlfetcher.py
|
--- virt-manager-1.2.1.orig/virtinst/urlfetcher.py
|
||||||
+++ virt-manager-1.2.0/virtinst/urlfetcher.py
|
+++ virt-manager-1.2.1/virtinst/urlfetcher.py
|
||||||
@@ -408,6 +408,24 @@ def _distroFromSUSEContent(fetcher, arch
|
@@ -408,6 +408,24 @@ def _distroFromSUSEContent(fetcher, arch
|
||||||
return ob
|
return ob
|
||||||
|
|
||||||
@ -48,10 +48,48 @@ Index: virt-manager-1.2.0/virtinst/urlfetcher.py
|
|||||||
+class WindowsDistro(Distro):
|
+class WindowsDistro(Distro):
|
||||||
+
|
+
|
||||||
+ urldistro = "windows"
|
+ urldistro = "windows"
|
||||||
+ os_variant = "win8.1"
|
+ os_variant = "win2k12r2"
|
||||||
+
|
+
|
||||||
+ def isValidStore(self):
|
+ def isValidStore(self):
|
||||||
+ return False
|
+ return False
|
||||||
|
|
||||||
# Build list of all *Distro classes
|
# Build list of all *Distro classes
|
||||||
def _build_distro_list():
|
def _build_distro_list():
|
||||||
|
Index: virt-manager-1.2.1/virtinst/distroinstaller.py
|
||||||
|
===================================================================
|
||||||
|
--- virt-manager-1.2.1.orig/virtinst/distroinstaller.py
|
||||||
|
+++ virt-manager-1.2.1/virtinst/distroinstaller.py
|
||||||
|
@@ -499,21 +499,25 @@ class DistroInstaller(Installer):
|
||||||
|
|
||||||
|
def detect_distro(self, guest):
|
||||||
|
distro = None
|
||||||
|
+ def _get_distro(guest):
|
||||||
|
+ try:
|
||||||
|
+ fetcher = self._get_fetcher(guest, None)
|
||||||
|
+ fetcher.prepareLocation()
|
||||||
|
+
|
||||||
|
+ store = self._get_store(guest, fetcher)
|
||||||
|
+ return store.get_osdict_info()
|
||||||
|
+ finally:
|
||||||
|
+ fetcher.cleanupLocation()
|
||||||
|
try:
|
||||||
|
if _is_url(self.conn, self.location):
|
||||||
|
- try:
|
||||||
|
- fetcher = self._get_fetcher(guest, None)
|
||||||
|
- fetcher.prepareLocation()
|
||||||
|
-
|
||||||
|
- store = self._get_store(guest, fetcher)
|
||||||
|
- distro = store.get_osdict_info()
|
||||||
|
- finally:
|
||||||
|
- fetcher.cleanupLocation()
|
||||||
|
+ distro = _get_distro(guest)
|
||||||
|
elif self.conn.is_remote():
|
||||||
|
logging.debug("Can't detect distro for media on "
|
||||||
|
"remote connection.")
|
||||||
|
else:
|
||||||
|
distro = OSDB.lookup_os_by_media(self.location)
|
||||||
|
+ if distro is None:
|
||||||
|
+ distro = _get_distro(guest)
|
||||||
|
except:
|
||||||
|
logging.debug("Error attempting to detect distro.", exc_info=True)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user