virt-manager/virtinst-detect-windows-media.patch
Charles Arnold 78a202101a - Upstream bug fixes
535fb6f6-hide-scrollbar-until-something-scrollable.patch
  535fe0c2-fix-screenshot-with-qxl-spice.patch
  535feaca-fix-storage-when-directory-name-contains-whitespace.patch
  535ff0b7-fix-install-when-one-package-is-already-installed.patch 
  536152fe-fix-error-detecting-OS-in-show-all-list.patch
  536154d8-show-error-if-launching-delete-dialog-fails.patch
  53615662-call-path_exists-before-getting-storage-volume.patch

- s390x: Set the correct emulator 
  virtinst-set-qemu-emulator.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=169
2014-05-01 03:32:04 +00:00

74 lines
3.1 KiB
Diff

Index: virt-manager-1.0.1/virtinst/urlfetcher.py
===================================================================
--- virt-manager-1.0.1.orig/virtinst/urlfetcher.py
+++ virt-manager-1.0.1/virtinst/urlfetcher.py
@@ -383,6 +383,24 @@ def _distroFromContent(fetcher, arch, vm
return ob
+def _distroFromAutorun(fetcher, arch, vmtype=None):
+ # Just look for autorun.inf (also in uppercase)
+ # If present media is likely from a windows iso.
+ distro_version = None
+ if not fetcher.hasFile("autorun.inf"):
+ return None
+
+ dclass = WindowsDistro
+
+ ob = dclass(fetcher, arch, vmtype)
+ if dclass != GenericDistro:
+ ob.content = distro_version
+
+ # Explictly call this, so we populate os_type/variant info
+ ob.isValidStore()
+
+ return ob
+
def getDistroStore(guest, fetcher):
stores = []
logging.debug("Finding distro store for location=%s", fetcher.location)
@@ -402,6 +420,10 @@ def getDistroStore(guest, fetcher):
if dist:
return dist
+ dist = _distroFromAutorun(fetcher, arch, _type)
+ if dist:
+ return dist
+
# FIXME: This 'distro ==' doesn't cut it. 'distro' is from our os
# dictionary, so would look like 'fedora9' or 'rhel5', so this needs
# to be a bit more intelligent
@@ -1148,6 +1170,13 @@ class ALTLinuxDistro(Distro):
logging.debug("Regex didn't match, not a %s distro", self.name)
return False
+class WindowsDistro(Distro):
+
+ urldistro = "windows"
+ os_variant = "win-unknown"
+
+ def isValidStore(self):
+ return False
# Build list of all *Distro classes
def _build_distro_list():
Index: virt-manager-1.0.1/virtinst/osdict.py
===================================================================
--- virt-manager-1.0.1.orig/virtinst/osdict.py
+++ virt-manager-1.0.1/virtinst/osdict.py
@@ -316,9 +316,12 @@ _add_var("win2k", "Microsoft Windows 200
_add_var("winxp", "Microsoft Windows XP", sortby="mswin5", supported=True, xen_disable_acpi=True, parent="windows")
_add_var("winxp64", "Microsoft Windows XP (x86_64)", supported=True, sortby="mswin564", parent="windows")
_add_var("win2k3", "Microsoft Windows Server 2003", supported=True, sortby="mswinserv2003", parent="windows")
-_add_var("win2k8", "Microsoft Windows Server 2008 (or later)", supported=True, sortby="mswinserv2008", parent="windows")
+_add_var("win2k8", "Microsoft Windows Server 2008", supported=True, sortby="mswinserv2008", parent="windows")
+_add_var("win2k12", "Microsoft Windows Server 2012 (or later)", supported=True, sortby="mswinserv2012", parent="windows")
_add_var("vista", "Microsoft Windows Vista", supported=True, sortby="mswin6", parent="windows")
-_add_var("win7", "Microsoft Windows 7 (or later)", supported=True, sortby="mswin7", parent="windows")
+_add_var("win7", "Microsoft Windows 7", supported=True, sortby="mswin7", parent="windows")
+_add_var("win8", "Microsoft Windows 8 (or later)", supported=True, sortby="mswin8", parent="windows")
+_add_var("win-unknown", "Microsoft Windows Unknown Version", supported=True, sortby="mswin", parent="windows")
_add_type("solaris", "Solaris", clock="localtime")