qemu-ga: Prevent QEMU-GA VSS provider from being unregistered on reinstall
PATCH 1/1 qemu-ga: Prevent QEMU-GA VSS provider from being unregistered on reinstall
Previously, running the .msi would unregister the QEMU GA VSS service if QEMU GA was already installed on the machine, and then register it only if QEMU GA was NOT previously installed. This behavior caused the service to be registered only after the INITIAL installation, and any subsequent run of the .msi (to redo, repair, or upgrade the installation) ended in the service being unregistered.
Now, the VSS service is still unregistered if QEMU GA is already installed (so that a fix or an update could be performed) but then it is registered again (if the GA is not being uninstalled) thus finishing the repair/upgrade correctly. Additionally, smooth upgrades and downgrades can be performed, as any run of the .msi will firstly remove the installed version, no matter what its version number is.
--- qga/installer/qemu-ga.wxs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
qga/installer/qemu-ga.wxs +4 -4
@@ -61,9 +61,9 @@ <Property Id="PREVIOUSVERSIONSINSTALLED" /> <Upgrade Id="{EB6B8302-C06E-4bec-ADAC-932C68A3A98D}"> <UpgradeVersion - Minimum="1.0.0.0" Maximum="$(env.QEMU_GA_VERSION)" + Minimum="1.0.0.0" Maximum="99.99.99.99" Property="PREVIOUSVERSIONSINSTALLED" - IncludeMinimum="yes" IncludeMaximum="no" /> + IncludeMinimum="yes" IncludeMaximum="yes" /> </Upgrade> <Directory Id="TARGETDIR" Name="SourceDir">
@@ -136,10 +136,10 @@ </Feature> <InstallExecuteSequence> - <RemoveExistingProducts Before="InstallInitialize" /> + <RemoveExistingProducts After="FindRelatedProducts" /> <?ifdef var.InstallVss ?> - <Custom Action="RegisterCom" After="InstallServices">NOT Installed</Custom> <Custom Action="UnRegisterCom" After="StopServices">Installed</Custom> + <Custom Action="RegisterCom" After="InstallServices">NOT REMOVE</Custom> <?endif?> </InstallExecuteSequence> </Product>
Signature · 1 line
2.4.3
Hi
Quoted 11 lines · Leonid Bloch
Previously, running the .msi would unregister the QEMU GA VSS service if QEMU GA was already installed on the machine, and then register it only if QEMU GA was NOT previously installed. This behavior caused the service to be registered only after the INITIAL installation, and any subsequent run of the .msi (to redo, repair, or upgrade the installation) ended in the service being unregistered.
Now, the VSS service is still unregistered if QEMU GA is already installed (so that a fix or an update could be performed) but then it is registered again (if the GA is not being uninstalled) thus finishing the repair/upgrade correctly. Additionally, smooth upgrades and downgrades can be performed, as any run of the .msi will firstly remove the installed version, no matter what its version number is.
This is quite unconventional. It's a good thing to prevent downgrade by default imho. User can override this behaviour by first uninstalling.
Quoted 11 lines
Signed-off-by Leonid Bloch <[email protected]>--- qga/installer/qemu-ga.wxs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)qga/installer/qemu-ga.wxs +0
-0
qga/installer/qemu-ga.wxs line 67
Quoted 9 lines
qga/installer/qemu-ga.wxs +2
-2@@ -61,9 +61,9 @@ <Property Id="PREVIOUSVERSIONSINSTALLED" /> <Upgrade Id="{EB6B8302-C06E-4bec-ADAC-932C68A3A98D}"> <UpgradeVersion - Minimum="1.0.0.0" Maximum="$(env.QEMU_GA_VERSION)" + Minimum="1.0.0.0" Maximum="99.99.99.99" Property="PREVIOUSVERSIONSINSTALLED" - IncludeMinimum="yes" IncludeMaximum="no" /> + IncludeMinimum="yes" IncludeMaximum="yes" /> </Upgrade>
I suggest we use MajorUpgrade instead. It should work with wixl:
http://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html
qga/installer/qemu-ga.wxs line 143
Quoted 13 lines
qga/installer/qemu-ga.wxs +2
-2<Directory Id="TARGETDIR" Name="SourceDir">@@ -136,10 +136,10 @@ </Feature> <InstallExecuteSequence> - <RemoveExistingProducts Before="InstallInitialize" /> + <RemoveExistingProducts After="FindRelatedProducts" /> <?ifdef var.InstallVss ?> - <Custom Action="RegisterCom" After="InstallServices">NOT Installed</Custom> <Custom Action="UnRegisterCom" After="StopServices">Installed</Custom> + <Custom Action="RegisterCom" After="InstallServices">NOT REMOVE</Custom> <?endif?>
looks good to me
Quoted 6 lines
qga/installer/qemu-ga.wxs +0
-1</InstallExecuteSequence> </Product> --2.4.3
Signature · 1 line
Marc-André Lureau