[gnome-boxes/account-for-interference-on-reboot-count] vm-creator: Account for when we fail to detect an OS as installed




commit 33b9a458c43890ef381fcde5c8160dd111aa4599
Author: Felipe Borges <felipeborges gnome org>
Date:   Thu Nov 5 11:46:16 2020 +0100

    vm-creator: Account for when we fail to detect an OS as installed
    
    When Boxes fails to detect that an operating system has been installed (due
    to user interference or because something changed in the operating system
    and we haven't yet pick up the changes in our OS database), it keeps the OS
    in the "installation" state (which is the case for this bugzilla [0]) because the
    number of reboots performed is different than the number of reboots necessary for
    this OS to be installed. This is the bug. The logic shouldn't be whether the number
    of reboots performed is equal than the number of reboot necessary to install,
    instead, the logic should be whether the number of reboots performed is bigger than
    the number of reboots necessary for the installation to be concluded.
    
    [0] https://bugzilla.redhat.com/1892297

 src/vm-creator.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index c4b71aa5..8e3582ff 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -257,7 +257,7 @@ private bool guest_installed_os (LibvirtMachine machine) {
 
         try {
             if (install_media.os_media != null && VMConfigurator.is_install_config (machine.domain_config))
-                return (num_reboots == install_media.os_media.installer_reboots);
+                return (num_reboots >= install_media.os_media.installer_reboots);
             else {
                 var info = volume.get_info ();
 


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