[virt-tools-list] [PATCH virt-viewer] wixl: use a versionized installation directory

Daniel P. Berrange berrange at redhat.com
Fri Jul 25 08:42:28 UTC 2014


On Thu, Jul 24, 2014 at 01:30:11PM +0200, Marc-André Lureau wrote:
> ping
> 
> 
> On Tue, Nov 12, 2013 at 3:27 AM, Marc-André Lureau <
> marcandre.lureau at gmail.com> wrote:
> 
> > It turned out that not only the current MSI broke the "component rule",
> > but also that our files are not versionized correctly. Windows Installer
> > applies some file versioning rules before replacing a file
> > http://msdn.microsoft.com/en-us/library/aa368599%28v=vs.85%29.aspx
> >
> > Since msitools doesn't extract version from files and populate the Version
> > field of the File table, it "usually" keep the current file installed.
> >
> > It's practically impossible to rely on version information from
> > files (from a quick look, only 5% of the files are versionized and even
> > less correctly, libgcrypt seems to do non-monotonic buildid for example)
> >
> > So the rule that applies when files are not versionized is to check the
> > file hash, and the modified date. File hash was added recently in
> > msitools, but doesn't apply when the installed file itself has a
> > version.
> >
> > In order to solve the above problems, it's simpler to just have a
> > different installation prefix. Windows Installer will see files with
> > different component guid, and won't be checking any file update rule.  I
> > have verified the upgrade is working, not leaving any file behind and
> > updating registry correctly with this solution. Until the files are
> > correctly versionized, it looks like the only sensible thing to
> > do. Furthermore, this make it simpler to have several versions installed
> > in parallel later on (when we change productid)
> > ---
> >  data/virt-viewer.wxs.in | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/data/virt-viewer.wxs.in b/data/virt-viewer.wxs.in
> > index d5c2522..a004de4 100644
> > --- a/data/virt-viewer.wxs.in
> > +++ b/data/virt-viewer.wxs.in
> > @@ -65,7 +65,7 @@
> >
> >      <Directory Id="TARGETDIR" Name="SourceDir">
> >        <Directory Id="$(var.ArchProgramFilesFolder)">
> > -        <Directory Id="INSTALLDIR" Name="VirtViewer">
> > +        <Directory Id="INSTALLDIR" Name="VirtViewer v at VERSION@@BUILDID@">
> >            <Component Id="CDepsFile" Guid="*">
> >              <File Id="filA1E799D196006E6DF67DACE15B8C6193" KeyPath="yes"
> > Source="deps.txt"/>
> >            </Component>

ACK


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the virt-tools-list mailing list