virt-manager/virtman-no-cd-present-fix.diff
Charles Arnold 6505c36ecc - Upstream bug fixes
virtman-netstats-fix.diff                                                           
  virtman-finish-button-fix.diff                                                      
  virtman-shutoff-fix.diff                                                            
  virtman-set-has-window-fix.diff                                                     
  virtman-grep-fix.diff                                                               
  virtman-no-cd-present-fix.diff                                                      
  virtman-resize-menu-fix.diff                                                        
  virtman-vcpu-count-fix.diff                                                         
  virtman-storage-pool-fix.diff                                                       
  virtman-domain-name-fix.diff                                                        
  virtman-unapplied-changes-fix.diff                                                  
  virtman-details-fix.diff                                                            
  virtman-delete-fix.diff                                                             
  virtman-collidelist-fix.diff                                                        
  virtman-char-device-mode-fix.diff                                                   
  virtinst-hv-version-fix.diff                                                        
  virtinst-initrd-inject-fix.diff                                                     
  virtinst-initrd-inject2-fix.diff                                                    
  virtinst-no-volume-fix.diff                                                         
  virtinst-prompts-fix.diff                                                           
  virtinst-cpu-model-name-fix.diff                                                    
  virtinst-xml-clear-fix.diff                                                         
  virtinst-remote-storage-fix.diff                                                    
  virtinst-error-message-fix.diff                                                     
  virtinst-typo-fix.diff                                                              
  virtinst-cdrom.diff                                                                 
  virtinst-storage-ocfs2.diff

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=63
2011-09-21 16:55:07 +00:00

69 lines
2.8 KiB
Diff

Subject: Fixes the TUI error when no CD is present for a CD installation.
From: Darryl L. Pierce dpierce@redhat.com Fri Aug 5 10:43:52 2011 -0400
Date: Tue Aug 9 11:53:36 2011 -0400:
Git: a885407aa106fb2cddf2fc5576634a93b60a460b
Before displaying the install media selection list it first ensures that
there is data to display.
If no install media was detected, a message is shown and the user cannot
proceed. They instead must move back and select another installation
path.
Index: virt-manager-0.9.0/src/virtManagerTui/adddomain.py
===================================================================
--- virt-manager-0.9.0.orig/src/virtManagerTui/adddomain.py
+++ virt-manager-0.9.0/src/virtManagerTui/adddomain.py
@@ -150,7 +150,7 @@ class DomainConfigScreen(VmmTuiConfigScr
elif page is SELECT_CDROM_PAGE:
if self.__install_media.getSelection() != None:
if len(self.get_libvirt().list_installable_volumes()) == 0:
- errors.append("No installable media is available.")
+ errors.append("No installable media detected.")
else:
return True
else:
@@ -349,6 +349,8 @@ class DomainConfigScreen(VmmTuiConfigScr
return self.__has_pools
elif page is SELECT_VOLUME_PAGE:
return self.__has_volumes
+ elif page is SELECT_CDROM_PAGE:
+ return self.__has_install_media
elif page < CONFIRM_PAGE:
return True
@@ -384,17 +386,23 @@ class DomainConfigScreen(VmmTuiConfigScr
grid]
def get_select_cdrom_page(self, screen):
- drives = []
+ fields = []
+ self.__has_install_media = False
devs = self.get_libvirt().list_installable_volumes()
- for dev in devs:
- row = [dev.pretty_label(), dev.get_path(),
- self.__config.is_install_media(dev.get_path())]
- drives.append(row)
- self.__install_media = snack.RadioBar(screen, (drives))
- grid = snack.Grid(1, 1)
- grid.setField(self.__install_media, 0, 0)
+ if len(devs) > 0:
+ drives = []
+ for dev in devs:
+ row = [dev.pretty_label(), dev.get_path(),
+ self.__config.is_install_media(dev.get_path())]
+ drives.append(row)
+ if len(drives) > 0:
+ self.__has_install_media = True
+ self.__install_media = snack.RadioBar(screen, (drives))
+ fields.append((self.__install_media, None))
+ if self.__has_install_media == False:
+ fields.append(("No media detected.", None))
return [snack.Label("Select the install media"),
- grid]
+ self.create_grid_from_fields(fields)]
def get_select_iso_page(self, screen):
ignore = screen