Last Comment Bug 367539 - When upgrading an existing install use the uninstall.log to uninstall the previous version before install.
: When upgrading an existing install use the uninstall.log to uninstall the pre...
Status: RESOLVED FIXED
:
Product: Toolkit
Classification: Components
Component: NSIS Installer (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: mozilla2.0
Assigned To: Robert Strong [:rstrong] (use needinfo to contact me)
:
: Matt Howell [:mhowell]
Mentors:
Depends on: 585649
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-19 14:15 PST by Robert Strong [:rstrong] (use needinfo to contact me)
Modified: 2010-08-09 10:26 PDT (History)
15 users (show)
dveditz: blocking1.8.1.4-
robert.strong.bugs: in‑testsuite-
robert.strong.bugs: in‑litmus-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
needed
.9-fixed
needed
.12-fixed


Attachments
1. main patch for mozilla-central (28.51 KB, patch)
2010-06-20 03:54 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
no flags Details | Diff | Splinter Review
2. SeaMonkey patch (6.93 KB, patch)
2010-06-20 03:55 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
no flags Details | Diff | Splinter Review
3. Thunderbird patch (8.37 KB, patch)
2010-06-20 03:55 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
no flags Details | Diff | Splinter Review
4. Sunbird patch (1.27 KB, patch)
2010-06-20 04:00 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
bugzilla: review+
Details | Diff | Splinter Review
5. final patch for mozilla-central (5.61 KB, patch)
2010-06-20 04:03 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
jmathies: review+
Details | Diff | Splinter Review
1. main patch for mozilla-central (checked in) (27.73 KB, patch)
2010-06-21 00:57 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
jmathies: review+
Details | Diff | Splinter Review
3. Thunderbird patch (7.18 KB, patch)
2010-06-21 01:03 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
philringnalda: review+
Details | Diff | Splinter Review
2. SeaMonkey patch (5.69 KB, patch)
2010-06-21 01:09 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
no flags Details | Diff | Splinter Review
1. mozilla-central main patch as pushed (checked in) (27.72 KB, patch)
2010-06-21 18:37 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
robert.strong.bugs: review+
Details | Diff | Splinter Review
Thunderbird fix (checked in) (787 bytes, patch)
2010-06-21 20:35 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
philringnalda: review+
Details | Diff | Splinter Review
SeaMonkey fix (checked in) (781 bytes, patch)
2010-06-21 21:28 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
no flags Details | Diff | Splinter Review
3. Thunderbird patch (7.42 KB, patch)
2010-06-21 21:57 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
robert.strong.bugs: review+
Details | Diff | Splinter Review
2. SeaMonkey patch (6.26 KB, patch)
2010-06-21 21:59 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
philringnalda: review+
Details | Diff | Splinter Review
1. main patch for mozilla-1.9.2 (27.84 KB, text/plain)
2010-06-21 23:45 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
no flags Details
SeaMonkey patch for mozilla-1.9.2 (4.44 KB, patch)
2010-06-21 23:58 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
robert.strong.bugs: review+
dveditz: approval1.9.1.12+
Details | Diff | Splinter Review
Thunderbird patch for mozilla-1.9.2 (5.98 KB, patch)
2010-06-22 00:00 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
robert.strong.bugs: review+
dveditz: approval1.9.2.9+
dveditz: approval1.9.1.12+
Details | Diff | Splinter Review
let application's deal with MapiProxy_InUse.dll and mozMapi32_InUse.dll if present (checked in) (1.05 KB, patch)
2010-06-22 00:57 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
dtownsend: review+
Details | Diff | Splinter Review
1. main patch for mozilla-1.9.2 and mozilla-1.9.1 (28.00 KB, patch)
2010-06-22 16:26 PDT, Robert Strong [:rstrong] (use needinfo to contact me)
robert.strong.bugs: review+
dveditz: approval1.9.2.9+
dveditz: approval1.9.1.12+
Details | Diff | Splinter Review

Description Robert Strong [:rstrong] (use needinfo to contact me) 2007-01-19 14:15:01 PST
This will allow the removal of reg keys when downgrading and is just safer overall.
Comment 1 Robert Strong [:rstrong] (use needinfo to contact me) 2007-02-14 01:06:32 PST
Nominating for 1.8.1.3 since bug 369102 made it into 1.8.0.10 and this will accomplish the same thing in a cleaner manner for 2.0.0.x.
Comment 2 Robert Strong [:rstrong] (use needinfo to contact me) 2007-02-14 01:44:02 PST
Taking to get this on my radar
Comment 3 Daniel Veditz [:dveditz] 2007-03-19 11:10:56 PDT
Not blocking ("stop everything and fix this"), but as with 369102 we might re-consider taking it if a fix gets implemented and tested in Firefox 3 first.
Comment 4 Robert Strong [:rstrong] (use needinfo to contact me) 2008-08-25 19:04:52 PDT
MSI is likely the better answer for this so reassigning back to default. If someone wants to take this on please do so
Comment 5 Robert Strong [:rstrong] (use needinfo to contact me) 2009-11-30 23:25:31 PST
We're not going to get MSI's before 3.7 so re-taking since this is another one of those PITA bugs.

Basic process (iirc jar files were locked exclusively in 2.0 so this should work just fine)

Parse the uninstall log
Rename existing file if it exists from log
Delete the renamed file with the REBOOTOK flag
Use similar / same logic to require a reboot as currently exists (might need some refactoring).
Comment 6 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-20 03:54:36 PDT
Created attachment 452541 [details] [diff] [review]
1. main patch for mozilla-central
Comment 7 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-20 03:55:30 PDT
Created attachment 452542 [details] [diff] [review]
2. SeaMonkey patch
Comment 8 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-20 03:55:58 PDT
Created attachment 452543 [details] [diff] [review]
3. Thunderbird patch
Comment 9 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-20 04:00:26 PDT
Created attachment 452544 [details] [diff] [review]
4. Sunbird patch

Simon, just in case someone compiles Sunbird's installer I'd like to remove the call for creating the removed-files.log since that will fail. If you would like me to I can also update the Sunbird installer as is being done for the other apps... it should only take a few minutes for me to create the patch.
Comment 10 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-20 04:03:22 PDT
Created attachment 452546 [details] [diff] [review]
5. final patch for mozilla-central
Comment 11 Simon Paquet [:sipaq] 2010-06-20 07:47:48 PDT
Comment on attachment 452544 [details] [diff] [review]
4. Sunbird patch

looks fine to me.
r=sipaq
Comment 12 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 00:57:49 PDT
Created attachment 452662 [details] [diff] [review]
1. main patch for mozilla-central (checked in)
Comment 13 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 01:03:32 PDT
Created attachment 452663 [details] [diff] [review]
3. Thunderbird patch

Phil, this along with the mozilla-central patch removes the use of removed-files for figuring out which files need to be removed when installing and instead uninstalls existing files / dirs listed in the uninstall.log. This way installing an older version on top of a pre-existing install will just work.
Comment 14 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 01:09:08 PDT
Created attachment 452664 [details] [diff] [review]
2. SeaMonkey patch

Callek, this along with the mozilla-central patch removes the use of
removed-files for figuring out which files need to be removed when installing
and instead uninstalls existing files / dirs listed in the uninstall.log. This
way installing an older version on top of a pre-existing install will just
work.
Comment 15 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 14:20:52 PDT
Drivers, this removes the requirement to update a previous releases removed-files list to include the new files in the latest release which has been one of the easily forgotten todo items whenever we do a release... I would really, really, really like to get this on the branches.
Comment 16 Jim Mathies [:jimm] 2010-06-21 15:02:38 PDT
I do not understand how this addresses the bug description - "When upgrading an existing install use the uninstall.log to uninstall the previous version before install."

This patch removes the uninstall.log generation from build? Some context might help. The patch itself looks fine, but I don't understand why we are doing it.
Comment 17 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 16:53:36 PDT
The patch removed the removed-files.log generation during build which was used to figure out which files needed to be removed and instead uses the previous installation's uninstall.log to remove the files / directories (if empty) for the previous installation before installing the new installation.

Comment #15 describes the reason why
Comment 18 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 17:13:45 PDT
Some history... removed-files was created to remove files on app update for all platforms. To support removing files on pave over installs it was processed during build time to create a file that is read by the installer to know which files should not be present in the new installation. This works ok for upgrading to a newer version but fails badly when downgrading to a previous version and we mitigate that as described in comment #15.

With this patch the existing installation's uninstall.log which is created at install time is read and all files are either removed or if the file is in use
1. it renames the file then removes the file on OS reboot
2. if it can't be renamed
  a) if the file exists in the source left in place to be replaced on OS reboot
  b) if the file doesn't exist in the source removes the file on OS reboot

So, the existing installation's uninstall.log is used to remove the previous installation's files before install and the use of the removed-files.log is removed.
Comment 19 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 18:32:01 PDT
Comment on attachment 452662 [details] [diff] [review]
1. main patch for mozilla-central (checked in)

Patch 1 pushed to mozilla-central
http://hg.mozilla.org/mozilla-central/rev/29248f12faa7

After I get reviews for the comm-central patches I'll push them and the final mozilla-central patches
Comment 20 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 18:37:50 PDT
Created attachment 452940 [details] [diff] [review]
1. mozilla-central main patch as pushed (checked in)

$R9 was already prefixed with a '\' so I removed the extra '\' in the IfFileExists checks as follows
      IfFileExists "$EXEDIR\nonlocalized$R9" end +1
      IfFileExists "$EXEDIR\localized$R9" end +1
      IfFileExists "$EXEDIR\optional$R9" end +1
Comment 21 Phil Ringnalda (:philor) 2010-06-21 19:07:53 PDT
Comment on attachment 452663 [details] [diff] [review]
3. Thunderbird patch

No more putting a random assortment of new files in removed-files on stable branches, and feeling vaguely guilty about not caring enough to do others? DO WANT!
Comment 22 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 20:35:18 PDT
Created attachment 452956 [details] [diff] [review]
Thunderbird fix (checked in)

Turns out that Thunderbird was using GetSingleInstallPath in installer.nsi without declaring !insertmacro GetSingleInstallPath and instead relying on the same declaration in common.nsh
Comment 23 Phil Ringnalda (:philor) 2010-06-21 20:37:02 PDT
Comment on attachment 452956 [details] [diff] [review]
Thunderbird fix (checked in)

Oops, bad us.
Comment 24 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 20:42:13 PDT
Comment on attachment 452956 [details] [diff] [review]
Thunderbird fix (checked in)

Pushed Thunderbird fix to comm-central
http://hg.mozilla.org/comm-central/rev/0dc792d7dffa

I suspect the missing declaration was my doing. :(
Comment 25 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 21:28:55 PDT
Created attachment 452961 [details] [diff] [review]
 SeaMonkey fix (checked in) 

Turns out the same is true for SeaMonkey... checked this in to fix the bustage
Comment 26 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 21:32:08 PDT
Comment on attachment 452961 [details] [diff] [review]
 SeaMonkey fix (checked in) 

Pushed to comm-central
http://hg.mozilla.org/comm-central/rev/0172f3c9251e
Comment 27 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 21:57:53 PDT
Created attachment 452965 [details] [diff] [review]
3. Thunderbird patch

Includes the removal of !insertmacro GetSingleInstallPath added by attachment #452956 [details] [diff] [review]. Carrying forward r+
Comment 28 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 21:59:46 PDT
Created attachment 452966 [details] [diff] [review]
2. SeaMonkey patch

Includes the removal of !insertmacro GetSingleInstallPath added by attachment #452961 [details] [diff] [review]
Comment 29 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 22:00:54 PDT
Comment on attachment 452966 [details] [diff] [review]
2. SeaMonkey patch

also requesting review from Phil since Callek said he could review this over irc
Comment 30 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 23:45:41 PDT
Created attachment 452988 [details]
1. main patch for mozilla-1.9.2

This doesn't remove the following from PreDirectoryCommon to prevent consumers that don't have that in their installer.nsi from failing.
!ifndef NO_INSTDIR_FROM_REG
    !insertmacro GetSingleInstallPath
!endif

Other than that it is the same patch as attachment #452940 [details] [diff] [review] for 1.9.2
Comment 31 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-21 23:58:12 PDT
Created attachment 452992 [details] [diff] [review]
SeaMonkey patch for mozilla-1.9.2

Not necessary to land with the main patch but it would be a good thing for SeaMonkey
Comment 32 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-22 00:00:10 PDT
Created attachment 452993 [details] [diff] [review]
Thunderbird patch for mozilla-1.9.2

Not necessary to land with the main patch but it would be a good thing for Thunderbird. This doesn't have the removal of the Makefile.in changes for the removed-files.log generation since the removal isn't necessary. Same goes for the SeaMonkey patch
Comment 33 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-22 00:46:03 PDT
The 1.9.2 patches also apply fine to 1.9.1
Comment 34 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-22 00:57:04 PDT
Created attachment 453006 [details] [diff] [review]
let application's deal with MapiProxy_InUse.dll and mozMapi32_InUse.dll if present (checked in)

Jim, SeaMonkey and Thunderbird have code to handle MapiProxy_InUse.dll and mozMapi32_InUse.dll being in use so this code should just ignore these two files.
Comment 35 Dave Townsend [:mossop] 2010-06-22 15:35:12 PDT
Comment on attachment 453006 [details] [diff] [review]
let application's deal with MapiProxy_InUse.dll and mozMapi32_InUse.dll if present (checked in)

Seems straightforward
Comment 36 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-22 15:54:05 PDT
Comment on attachment 453006 [details] [diff] [review]
let application's deal with MapiProxy_InUse.dll and mozMapi32_InUse.dll if present (checked in)

Pushed to mozilla-central
http://hg.mozilla.org/mozilla-central/rev/bd08417f6869
Comment 37 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-22 15:56:36 PDT
The functionality is already landed and all that is left is the review of the SeaMonkey patch and then landing all of the comm-central patches along with the final mozilla-central patch. The functionality itself landed with the main patch and the rest are just cleanup.
Comment 38 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-22 16:26:36 PDT
Created attachment 453229 [details] [diff] [review]
1. main patch for mozilla-1.9.2 and mozilla-1.9.1

Requesting branch approval for a rollup patch with minimal changes for 1.9.2 and 1.9.1
Comment 39 Phil Ringnalda (:philor) 2010-06-22 17:02:49 PDT
Comment on attachment 452966 [details] [diff] [review]
2. SeaMonkey patch

LGTM.
Comment 40 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-22 19:21:09 PDT
Pushed to mozilla-central
http://hg.mozilla.org/mozilla-central/rev/4c7be0d2836d

Pushed to comm-central
Thunderbird
http://hg.mozilla.org/comm-central/rev/73d458b52ccb

SeaMonkey
http://hg.mozilla.org/comm-central/rev/2671e8da40f3

Sunbird
http://hg.mozilla.org/comm-central/rev/2fbc10fc82ef

I'm pretty sure there are existing litmus tests for the installer already which covers this about as well as we can.
Comment 41 Daniel Veditz [:dveditz] 2010-06-23 10:28:39 PDT
Not "blocking" a branch release, marking "needed" so we see it again later but definitely not taking this in the waning days of 1.9.2.6/1.9.1.11
Comment 42 Robert Strong [:rstrong] (use needinfo to contact me) 2010-06-23 10:56:49 PDT
I think the last time I pushed drivers to accept a patch for the branch was probably around 4 years ago and I typically just have the attitude that if a patch isn't approved we'll just get to it the next time around instead of making a fuss. In this instance, the waning days of 1.9.2.6/1.9.1.11 equates to end of July with the understanding that we want to freeze early due to the summit. What ever the reason, that is around a month away for 1.9.2.6/1.9.1.11 and likely another month for 1.9.2.7/1.9.1.12 where this patch *might* be approved. Also, not accepting this patch can lead to some users ending up with a Firefox that doesn't work when downgrading without uninstalling first. I don't think this happens very often but this applies to all Windows users which is the vast majority of our user base. The patch itself uses a modified version of the code that does our uninstall and moves a couple of blocks of existing code to better check when the user should reboot before performing an install and files in use checks.
Comment 43 Daniel Veditz [:dveditz] 2010-07-16 11:11:11 PDT
Comment on attachment 453229 [details] [diff] [review]
1. main patch for mozilla-1.9.2 and mozilla-1.9.1

Approved for 1.9.2.8 and 1.9.1.12, a=dveditz for release-drivers
Comment 44 Robert Strong [:rstrong] (use needinfo to contact me) 2010-07-18 13:51:40 PDT
Comment on attachment 452993 [details] [diff] [review]
Thunderbird patch for mozilla-1.9.2

These aren't necessary to land the main patch but they are "nice to haves".
Comment 45 Robert Strong [:rstrong] (use needinfo to contact me) 2010-07-18 13:53:00 PDT
Comment on attachment 452992 [details] [diff] [review]
SeaMonkey patch for mozilla-1.9.2

These aren't necessary to land the main patch but they are "nice to haves".
Comment 46 Mike Beltzner [:beltzner, not reading bugmail] 2010-07-23 10:54:27 PDT
This has a=beltzner for 1.9.2.9 - that flag just doesn't, um, exist yet.
Comment 47 Daniel Veditz [:dveditz] 2010-07-23 11:11:31 PDT
Comment on attachment 453229 [details] [diff] [review]
1. main patch for mozilla-1.9.2 and mozilla-1.9.1

Approved for 1.9.2.9 and 1.9.1.12, a=dveditz for release-drivers
Comment 48 Daniel Veditz [:dveditz] 2010-07-23 11:11:57 PDT
Comment on attachment 452992 [details] [diff] [review]
SeaMonkey patch for mozilla-1.9.2

Approved for 1.9.1.12, a=dveditz for release-drivers
Comment 49 Daniel Veditz [:dveditz] 2010-07-23 11:12:40 PDT
Comment on attachment 452993 [details] [diff] [review]
Thunderbird patch for mozilla-1.9.2

Approved for 1.9.2.9 and 1.9.1.12, a=dveditz for release-drivers
Comment 50 Robert Strong [:rstrong] (use needinfo to contact me) 2010-07-26 17:17:02 PDT
Pushed to mozilla-1.9.2
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/6f2999bb8d4b

Pushed Thunderbird patch to comm-1.9.2
http://hg.mozilla.org/releases/comm-1.9.2/rev/09f8d91be420

Looks like SeaMonkey doesn't need a comm-1.9.2 patch but if SeaMonkey wants it on 1.9.2 they can push the attachment #452992 [details] [diff] [review]
Comment 51 Robert Strong [:rstrong] (use needinfo to contact me) 2010-07-26 17:32:53 PDT
Pushed to mozilla-1.9.1
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/42e4b43487b1

Pushed to comm-1.9.1 for SeaMonkey
http://hg.mozilla.org/releases/comm-1.9.1/rev/8d98a6017878

Pushed to comm-1.9.1 for Thunderbird
http://hg.mozilla.org/releases/comm-1.9.1/rev/3df36ec8d70f

Note You need to log in before you can comment on or make changes to this bug.