Background Updates/Implementation Strategies: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 35: Line 35:


One approach in updating the stub executable is for it to check inside the library directory that it decides to load libraries from and look for a firefox.exe executable.  If one is found there, it indicates that the stub should be updated, so then we can use the current trick of updating update.exe (writing a copy of the stub to another directory, launching that one for the sole purpose of replacing the stub, and then restarting using the new stub).  This additional operation only needs to be performed when the stub is actually changed during the update.  The updater can check and make sure that the stub is changed when it's applying the update in the background, and remove it (or don't write it to disk in the first place) if it has not changed.
One approach in updating the stub executable is for it to check inside the library directory that it decides to load libraries from and look for a firefox.exe executable.  If one is found there, it indicates that the stub should be updated, so then we can use the current trick of updating update.exe (writing a copy of the stub to another directory, launching that one for the sole purpose of replacing the stub, and then restarting using the new stub).  This additional operation only needs to be performed when the stub is actually changed during the update.  The updater can check and make sure that the stub is changed when it's applying the update in the background, and remove it (or don't write it to disk in the first place) if it has not changed.
== Details on the side-by-side approach ==
=== Versioning ===
We need a way to name the two versions living next to each other.  My proposal is to use the following format
<hg generational index>.<hg revision>
("hg generational index" is the number of the changeset living in the hg database, which is seen throughout the hg UI).
The rationale for this is that we need a way to determine which one of two versions is newer, and coming up with a method for that is really tricky in a non-linear multi-repository development model, such as what we have now.  Here are a number of use cases which is satisfied by this scheme:
* The comparison is simple (just a numerical comparison) and doesn't rely on filesystem timestamps.
* The comparison does not rely on Firefox version numbers, which makes it work for branches which update with the same version number (such as Nightly)
* The comparison works with our current multi-repository release model.  Under all conceivable circumstances, we can assume that if F returns the number of revisions in an hg repository, then:
F(mozilla-release) < F(mozilla-aurora) < F(mozilla-beta) < F(mozilla-central)
Downsides of this approach:
* Updating between development branches might not work correctly.  For example, if we ever decide to move a bunch of users from the nightly update channel to the devtools update channel, the update process might fail to work because the devtools branch might have fewer chanegsets in the Mercurial repository.
Confirmed users
657

edits

Navigation menu