qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Leonid Bloch <leonid@daynix.com>
To: qemu-devel@nongnu.org
Cc: Leonid Bloch <leonid@daynix.com>, marcandre.lureau@gmail.com
Subject: [Qemu-devel] [PATCH v3 4/4] qemu-ga: Prevent QEMU-GA VSS provider from being unregistered on MSI reinstall
Date: Mon,  3 Aug 2015 20:54:24 +0300	[thread overview]
Message-ID: <1438624464-22770-5-git-send-email-leonid@daynix.com> (raw)
In-Reply-To: <1438624464-22770-1-git-send-email-leonid@daynix.com>

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, downgrading is now prevented. If a user would like to downgrade a version, he/she must uninstall the newer version first.

Signed-off-by: Leonid Bloch <leonid@daynix.com>
---
 qga/installer/qemu-ga.wxs | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs
index 2302745..41b11cf 100644
--- a/qga/installer/qemu-ga.wxs
+++ b/qga/installer/qemu-ga.wxs
@@ -58,13 +58,9 @@
       />
     <Media Id="1" Cabinet="qemu_ga.$(env.QEMU_GA_VERSION).cab" EmbedCab="yes" />
     <Property Id="WHSLogo">1</Property>
-    <Property Id="PREVIOUSVERSIONSINSTALLED" />
-    <Upgrade Id="{EB6B8302-C06E-4bec-ADAC-932C68A3A98D}">
-      <UpgradeVersion
-        Minimum="1.0.0.0" Maximum="$(env.QEMU_GA_VERSION)"
-        Property="PREVIOUSVERSIONSINSTALLED"
-        IncludeMinimum="yes" IncludeMaximum="no" />
-    </Upgrade>
+    <MajorUpgrade
+      DowngradeErrorMessage="Error: A newer version of QEMU guest agent is already installed."
+      />
 
     <Directory Id="TARGETDIR" Name="SourceDir">
       <Directory Id="$(var.GaProgramFilesFolder)" Name="QEMU Guest Agent">
@@ -125,6 +121,7 @@
     </Directory>
 
     <Property Id="cmd" Value="cmd.exe"/>
+    <Property Id="REINSTALLMODE" Value="amus"/>
 
     <?ifdef var.InstallVss?>
     <CustomAction Id="RegisterCom"
@@ -160,10 +157,9 @@
     </Feature>
 
     <InstallExecuteSequence>
-      <RemoveExistingProducts Before="InstallInitialize" />
       <?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>
-- 
2.4.3

  parent reply	other threads:[~2015-08-03 17:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03 17:54 [Qemu-devel] [PATCH v3 0/4] qemu-ga: Fixes to the QEMU GA MSI installer Leonid Bloch
2015-08-03 17:54 ` [Qemu-devel] [PATCH v3 1/4] qemu-ga: Fixed GUID capitalization Leonid Bloch
2015-08-03 17:54 ` [Qemu-devel] [PATCH v3 2/4] qemu-ga: Minor cosmetic changes to the WXS file Leonid Bloch
2015-08-03 17:54 ` [Qemu-devel] [PATCH v3 3/4] qemu-ga: Created a separate component for each installed file in the MSI Leonid Bloch
2015-08-03 20:40   ` Marc-André Lureau
2015-08-25 21:48   ` Michael Roth
2015-08-25 21:58     ` Michael Roth
2015-08-26  9:46     ` Leonid Bloch
2015-08-03 17:54 ` Leonid Bloch [this message]
2015-08-03 20:41   ` [Qemu-devel] [PATCH v3 4/4] qemu-ga: Prevent QEMU-GA VSS provider from being unregistered on MSI reinstall Marc-André Lureau
2015-08-25 21:54 ` [Qemu-devel] [PATCH v3 0/4] qemu-ga: Fixes to the QEMU GA MSI installer Michael Roth
2015-08-26 22:29 ` Michael Roth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438624464-22770-5-git-send-email-leonid@daynix.com \
    --to=leonid@daynix.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).