Open Bug 1892076 Opened 5 months ago Updated 5 months ago

Update process should support updating with versioned installation directories

Categories

(Toolkit :: Application Update, task, P3)

Unspecified
Windows
task

Tracking

()

People

(Reporter: bytesized, Unassigned)

References

(Depends on 4 open bugs, Blocks 1 open bug)

Details

(Whiteboard: [fidedi-ope])

Note that the scope of this bug does not include adding the cleanup code (Bug 1891620) or the migration code (Bug 1892064). It only includes the changes to the update process in order to update from a version using versioned installation directories to a version using versioned installation directories.

The changes to update versioned installations properly are pretty straightforward. Simply recursively copy the directory of the version we are updating from to a new directory, update that directory, and perform the update as usual. After this is complete, replace the version selector binary at the top level of the installation directory with the version selector contained in the updated Firefox installation.

The updater also needs to be able to determine which version is "active" in order to prevent downgrade attacks. We don't want to be tricked into downgrading the "active" version by upgrading an older, available version. This should be as simple as reading the active version selector's Version Metadata (Bug 1891623) and comparing that against the version that we are installing.

The updater should determine which update mechanism to use based on the MAR metadata (Bug 1892061).

The updater should run cleanup mode (Bug 1891620) before and after the update. When it cleans up before the update, it needs to make sure that it doesn't clean up the version that we are going to update from.

This update mechanism is probably going to need to take to take a boolean parameter indicating whether or not this is the immediately-post-migration update because in that case and only in that case, it is okay for the version selector to be absent.

We also want to impose a limit of how many versions we will install at once. If the maximum number of versions are already installed and we can't clean any up, we should report an error that will be propagated to Firefox. We may also want to add some kind of messaging to convey to the user why we aren't able to update. Though it's possible that for now we will do something more like "try updating X times. If we fail all of them, give the manual update prompt"

Once this functionality and the migration functionality are both ready, we'll want to do a watershed to ensure that once someone download an update that requires being migrated to use versioned installation directories, the necessary migration and update code are guaranteed to be available.

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