Re: [virt-manager PATCH] virt-manager: validate URL if OS detection is not in progress

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/17/2014 06:10 AM, Giuseppe Scrivano wrote:
> There is no reason to wait for the OS to be detected before validating
> the user input when there is no detection active.  Make sure we block
> only if the OS detection is in progress.
> 
> Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1086529
> 
> Signed-off-by: Giuseppe Scrivano <gscrivan@xxxxxxxxxx>
> ---
>  virtManager/create.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/virtManager/create.py b/virtManager/create.py
> index 0757f94..673d0cd 100644
> --- a/virtManager/create.py
> +++ b/virtManager/create.py
> @@ -1314,7 +1314,8 @@ class vmmCreate(vmmGObjectUI):
>          if self.have_startup_error:
>              return
>  
> -        if curpage == PAGE_INSTALL and self.should_detect_media():
> +        if (curpage == PAGE_INSTALL and self.should_detect_media()
> +            and self.detectedDistro == DETECT_INPROGRESS):
>              # Make sure we have detected the OS before validating the page
>              self.detect_media_os(forward=True)
>              return
> 

This isn't correct. If you follow the code path, calling detect_media_os when
self.detectedDistro == DETECT_INPROGRESS is a no-op.

What that check is trying to fix is the case when a user fills in a URL, auto
detect is selected, but they never 'activate' the URL text entry so detection
isn't manually triggered. In that case, we should initiate distro detection
when the user clicks 'forward'. This change breaks that.

Though off hand I don't know what the proper fix for that bug is, it needs to
preserve the above behavior though

- Cole

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux