From 2bca5052f137b932c1f6492f55f6f208d9796127 Mon Sep 17 00:00:00 2001 From: Mario Loriedo Date: Wed, 4 Dec 2024 11:16:16 +0100 Subject: [PATCH] Avoid rebooting on Windows when upgrading and WSL isn't installed When building an installer from main branch, and using it to upgrade the latest Podman release on Windows, a reboot is triggered if WSL is not installed. This is a regression caused by an update of the condition to execute `ForceReboot`. This commit fixes the condition and updates some defaults to make it even more unlikely that reboot happens withtout a specific user request for it. It doesn't fix the v5.3.1 to v5.3.2 upgrade though. v5.3.1 has been released already and this commit doesn't avoid that it triggers a reboot when updated. Signed-off-by: Mario Loriedo --- contrib/win-installer/podman.wxs | 8 ++++---- contrib/win-installer/test-installer.ps1 | 11 ++++++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/contrib/win-installer/podman.wxs b/contrib/win-installer/podman.wxs index b5da76a9fe..e78afa00e8 100644 --- a/contrib/win-installer/podman.wxs +++ b/contrib/win-installer/podman.wxs @@ -72,14 +72,14 @@ - + - + @@ -110,13 +110,13 @@ - + - + diff --git a/contrib/win-installer/test-installer.ps1 b/contrib/win-installer/test-installer.ps1 index 1696034988..f8c466eaa6 100644 --- a/contrib/win-installer/test-installer.ps1 +++ b/contrib/win-installer/test-installer.ps1 @@ -1,6 +1,11 @@ #!/usr/bin/env pwsh -# Example usage: +# Usage examples: +# +# 1) Build a v9.9.9 installer and run `update-without-user-chages` +# scenario without specifying the previous setup exe (it will download from +# GitHub): +# # rm .\contrib\win-installer\*.log && # rm .\contrib\win-installer\*.exe && # rm .\contrib\win-installer\*.wixpdb && @@ -92,10 +97,10 @@ function Install-Podman-With-Defaults { $ret = Start-Process -Wait ` -PassThru "$setupExePath" ` -ArgumentList "/install /quiet ` - /log $PSScriptRoot\podman-setup.log" + /log $PSScriptRoot\podman-setup-default.log" if ($ret.ExitCode -ne 0) { Write-Host "Install failed, dumping log" - Get-Content $PSScriptRoot\podman-setup.log + Get-Content $PSScriptRoot\podman-setup-default.log throw "Exit code is $($ret.ExitCode)" } Write-Host "Installation completed successfully!`n"