Confirmed users
657
edits
No edit summary |
|||
| Line 41: | Line 41: | ||
We need a way to name the two versions living next to each other. My proposal is to use the following format | 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>.<hg full revision ID> | ||
("hg generational index" is the number of the changeset living in the hg database, which is seen throughout the hg UI). | ("hg generational index" is the number of the changeset living in the hg database, which is seen throughout the hg UI). | ||
| Line 49: | Line 49: | ||
* The comparison is simple (just a numerical comparison) and doesn't rely on filesystem timestamps. | * 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 does not rely on Firefox version numbers, which makes it work for branches which update with the same version number (such as Nightly) | ||
* We can use the hg full revision ID in the updater later to refuse to install two versions with the same generational index and the same hg full revision ID. If the generational index are the same and the revision IDs are not, then we can artificially increment the generational index of the update to be installed by 1 so that it gets picked up later in the startup process. | |||
* 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: | * 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: | ||
| Line 56: | Line 57: | ||
* 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. | * 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. | ||
=== Migration === | |||
We need a migration plan so that we can get users from the current installation model to a side-by-side installation model. For example, on Windows, here's what we currently have in an installation: | |||
C:\Program Files\Mozilla Firefox\ | |||
firefox.exe | |||
xul.dll | |||
... | |||
components\ | |||
... | |||
This is what the target will look like: | |||
C:\Program Files\Mozilla Firefox\ | |||
firefox.exe | |||
77562.45ac18984273\ | |||
xul.dll | |||
... | |||
components\ | |||
... | |||
A similar directory structure is proposed for Linux and Mac as well. | |||
Here's the plan of attack for this problem: | |||
# Make the stub executable aware of this directory layout. | |||
** The installer will look for directories named \d+\.[a-fA-F\d]{40}. | |||
** If more than such a directory is found, the stub executable will do a version comparison and pick the newer one. | |||
** If such a directory is found, the stub executable will load DLLs from that directory instead of its own. Platform specific details TBD. | |||
** If such a directory is not found, everything will proceed as it does today. | |||
** If a version specific directory is found, that will serve as the process directory for all intents and purposes from that point on. | |||
# Change the packaging step to actually package stuff under that structure. | |||
==== Alternative approach ==== | |||
I'm not yet quite confident that it's OK to have a current directory without firefox.exe inside it. An alternative approach is to write a new stub executable from scratch which does as little as possible, picks the latest version and forks the firefox.exe process inside that directory. That way, almost nothing will change compared to the way existing installations work, except for one component being added to the path. | |||