Change Windows installer MajorUpgrade Schedule

Use Schedule "afterInstallExecute" (instead of the
default "afterInstallValidate") in the Windows
installer MajorUpgrade element. That avoid
overriding eventual users changes to the podman
machine configuration file created by the
installer.

Fixes #23502

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
This commit is contained in:
Mario Loriedo
2024-08-05 21:52:54 +02:00
parent 43a077db87
commit 01d739a65e
2 changed files with 6 additions and 4 deletions

View File

@ -12,7 +12,7 @@
<Package Name="podman" Manufacturer="Red Hat Inc." Version="$(VERSION)" UpgradeCode="a6a9dd9c-0732-44ba-9279-ffe22ea50671">
<Media Id="1" Cabinet="Podman.cab" EmbedCab="yes" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." RemoveFeatures="Complete" Schedule="afterInstallExecute" />
<Property Id="DiskPrompt" Value="Red Hat's Podman $(VERSION) Installation" />
<Property Id="MACHINE_PROVIDER" Value="wsl" />
<Property Id="MACHINE_PROVIDER_CONFIG_FILE_PATH">
@ -93,11 +93,13 @@
<ComponentRef Id="GvProxyExecutable" />
<?endif?>
<ComponentRef Id="GuideHTMLComponent" />
<ComponentRef Id="MachineProviderConfigFile" />
<ComponentGroupRef Id="ManFiles" />
<ComponentGroupRef Id="WSLFeature" />
<ComponentGroupRef Id="HyperVFeature" />
</Feature>
<Feature Id="MachineProviderConfig" Level="1">
<ComponentRef Id="MachineProviderConfigFile" />
</Feature>
<Icon Id="podman.ico" SourceFile="resources/podman-logo.ico" />
<Property Id="ARPPRODUCTICON" Value="podman.ico" />
@ -152,7 +154,7 @@
<StandardDirectory Id="CommonAppDataFolder">
<Directory Id="CONFIGDIR" Name="containers">
<Directory Id="ContainersConfigSubDir" Name="containers.conf.d">
<Component Id="MachineProviderConfigFile" Guid="C32C0040-D9AF-4155-AC7E-465B63B6BE3B" Condition="CREATE_MACHINE_PROVIDER_CONFIG_FILE" NeverOverwrite="true">
<Component Id="MachineProviderConfigFile" Guid="C32C0040-D9AF-4155-AC7E-465B63B6BE3B" Condition="CREATE_MACHINE_PROVIDER_CONFIG_FILE">
<CreateFolder />
<IniFile Id="MachineProviderConfigFile" Action="createLine" Directory="ContainersConfigSubDir" Section="machine" Name="99-podman-machine-provider.conf" Key="provider" Value="&quot;[MACHINE_PROVIDER]&quot;" />
</Component>

View File

@ -293,7 +293,7 @@ switch ($scenario) {
Start-Scenario-Installation-Skip-Config-Creation-Flag
Start-Scenario-Installation-With-Pre-Existing-Podman-Exe
Start-Scenario-Update-Without-User-Changes
# Start-Scenario-Update-With-User-Changed-Config-File
Start-Scenario-Update-With-User-Changed-Config-File
Start-Scenario-Update-With-User-Removed-Config-File
}
}