Closed Bug 1690064 Opened 5 years ago Closed 4 years ago

Consistently delete all update data on uninstall, but leave configuration data on install

Categories

(Firefox :: Installer, defect)

defect

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: bytesized, Assigned: bytesized)

Details

Attachments

(1 file)

It seems that when a paveover install is performed, we only delete the update directory if the "updates" subdirectory exists. We should probably be consistent about this and either always delete it or always leave it, otherwise we aren't consistent about whether or not we reset the update configuration.

Perhaps instead, we should consistently delete this at uninstall time and explicitly not delete this on a paveover install, as suggested in Bug 1689759 Comment 13. I'll have to look into how difficult it would be to make this change when I have more time.

For future folks who think about this problem: I believe the UpdRootD is also used to store attribution data, i.e., postSigningData on Windows. And I expect to use this to store some shared background update task stuff (Glean DB for metrics) in the not too distant future as well.

Unless I am mistaken, I believe that the postSigningData on Windows does not live in the update directory. I think it is written to the installation directory and then copied to the Local App Data directory (here). This is a user-specific directory that is distinct (despite its deceptively similar name) from the Program Data directory, where the update directory lives.

It appears that this does reside in the Update directory on macOS, but not on Windows.

Came here via bug #1689759 which is closed, it looks like this is where the conversation has carried over to.

I just want to offer additional perspective to @Spampot's comments over on the other bug re: paveover being a supported upgrade path. I agree that it just makes sense and make two additional observations:

  1. using an installer to upgrade over an existing install is an extremely common workflow on Windows that is almost universally supported. Only in very rare circumstances do some programs fail to account for it. If not an official standard from MS, it is at least a de facto standard going back decades and conforming to it helps to meet how users have come to expect applications to behave.

  2. when performing a pave-over install, the firefox installer itself says "Upgrade" instead of "Install" on the button. This is not to say that the button's wording determines behaviour, rather, the other way around, it is a reflection of the intended behaviour. Other installers that don't go out of their way to detect an existing install routinely support upgrade installs anyway, the detection is often just a UI nicety. But the fact that Firefox currently goes out of its way to change the word on the button suggests that at least at one point the intention was to support a regular upgrade path via the installer.

And now throwing some ideas out for possible ways to change this, in addition to the ones already mentioned:

  • reset only when paveover installing the same or lower version as what is already installed

  • add a step in the installer to ask if the user wants a full reset - this has the bonus of being able to completely reset all profiles too if the user selects the option

Thanks!

(In reply to primexx from comment #4)

  • reset only when paveover installing the same or lower version as what is already installed

Disagree. A paveover install of the same version is what Windows traditionally calls a "repair install".
It is supposed to fix damaged program files (by overwriting them) and add missing program files.
It was never supposed to modify or reset any program settings (unless explicitly commanded by the user).

  • add a step in the installer to ask if the user wants a full reset - this has the bonus of being able to completely reset all profiles too if the user selects the option

I'd still not tie resetting of user profiles to install procedures.
An install run should never change existing user profile or installation-level settings.
If something alike is desired, I'd rather add options to the un-installer to delete all installation-level settings (with "yes" being the default) and to also delete all existing user profiles (with "no" being the default).

I am currently working on a patch that will consistently delete all update data on uninstall, but will leave the configuration and update history on install.

Assignee: nobody → ksteuber
Summary: Consistently delete update-config.json on paveover install → Consistently delete all update data on uninstall, but leave configuration data on install
Pushed by ksteuber@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8a8bbfdbd6bb Consistently delete all update data on uninstall, but leave configuration data on install r=agashlin
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: