Confirmed users
657
edits
(→Mac) |
No edit summary |
||
| Line 30: | Line 30: | ||
*** On Mac, if Firefox is installed to "/path/to/Firefox.app", <code>FIREFOX_NEW</code> will be "/path/to/Firefox.app/Updated.app". In other words, the updated version of Firefox will be installed as a bundle inside the existing Firefox bundle. | *** On Mac, if Firefox is installed to "/path/to/Firefox.app", <code>FIREFOX_NEW</code> will be "/path/to/Firefox.app/Updated.app". In other words, the updated version of Firefox will be installed as a bundle inside the existing Firefox bundle. | ||
*** On Linux, if Firefox is installed to a flat directory like "/path/to/firefox", <code>FIREFOX_NEW</code> will be "/path/to/firefox/updated". If it's installed in a non-flat directory structure (like /usr/bin for example), the details of where <code>FIREFOX_NEW</code> will be is TBD. | *** On Linux, if Firefox is installed to a flat directory like "/path/to/firefox", <code>FIREFOX_NEW</code> will be "/path/to/firefox/updated". If it's installed in a non-flat directory structure (like /usr/bin for example), the details of where <code>FIREFOX_NEW</code> will be is TBD. | ||
** The manifest file | ** The manifest file is the "update.status" file used by the updater service. | ||
* The updater binary checks to see if there is an existing manifest file | * The updater binary checks to see if there is an existing manifest file. | ||
** If this file exists, it | ** If this file exists, and it contains "applied", its content is changed to "applying". Otherwise, the background update stops. | ||
* The updater binary checks to see if there is an existing <code>FIREFOX_NEW</code> directory. | * The updater binary checks to see if there is an existing <code>FIREFOX_NEW</code> directory. | ||
** If this directory exists, it will be removed. | ** If this directory exists, it will be removed. | ||
* The updater binary will go ahead and apply the update to the <code>FIREFOX_NEW</code> directory using the existing installation directory as the base. Any errors happening during this phase (such as running out of disk space or failing to write to disk) will be handled by the updater process by removing the <code>FIREFOX_NEW</code> directory and aborting. :[[User:Robert Strong|Robert Strong]] 02:16, 18 October 2011 (PDT) The updater binary will also write to the update.status file "failed: n" where n is the reason code. | * The updater binary will go ahead and apply the update to the <code>FIREFOX_NEW</code> directory using the existing installation directory as the base. Any errors happening during this phase (such as running out of disk space or failing to write to disk) will be handled by the updater process by removing the <code>FIREFOX_NEW</code> directory and aborting. :[[User:Robert Strong|Robert Strong]] 02:16, 18 October 2011 (PDT) The updater binary will also write to the update.status file "failed: n" where n is the reason code. | ||
* The updater binary will write | * The updater binary will write "applied" to the manifest file. | ||
* The updater binary will shutdown, and signal the Firefox main process. | * The updater binary will shutdown, and signal the Firefox main process. | ||
* The Firefox main process will search for new updates when the next update interval is reached. | * The Firefox main process will search for new updates when the next update interval is reached. | ||
| Line 43: | Line 43: | ||
The following needs to happen at Firefox startup time in order for the applied update to be used. | The following needs to happen at Firefox startup time in order for the applied update to be used. | ||
* Firefox checks for the manifest file in the installation directory. If it's not found, then startup continues as normal. | * Firefox checks for the manifest file in the installation directory. If it's not found, or its content does not equal "applied", then startup continues as normal. | ||
* If the manifest file is found, Firefox looks for the known <code>FIREFOX_NEW</code> directory. If that directory is not found, Firefox | * If the manifest file is found and its content is "applied", Firefox looks for the known <code>FIREFOX_NEW</code> directory. If that directory is not found, Firefox writes "failed: ERROR_CODE" to the manifest file and continues to startup as normal. | ||
* If the <code>FIREFOX_NEW</code> is found, Firefox "replaces" the existing installation direcotry with the new <code>FIREFOX_NEW</code> directory, and removes the <code>FIREFOX_NEW</code> directory, and restarts using the new binary. The details of this phase depends on the platform, and is documented below. | * If the <code>FIREFOX_NEW</code> is found, Firefox "replaces" the existing installation direcotry with the new <code>FIREFOX_NEW</code> directory, and removes the <code>FIREFOX_NEW</code> directory, and restarts using the new binary. The details of this phase depends on the platform, and is documented below. | ||
| Line 58: | Line 58: | ||
=== Mac === | === Mac === | ||
On Mac, we basically move the Contents directory in the <code>FIREFOX_NEW</code> directory over to the Contents directory in the existing installation, remove | On Mac, we basically move the Contents directory in the <code>FIREFOX_NEW</code> directory over to the Contents directory in the existing installation, remove the now empty <code>FIREFOX_NEW</code> directory, write "succeeded" to the manifest file, and restart Firefox. :[[User:Robert Strong|Robert Strong]] 02:19, 18 October 2011 (PDT) There is also the precomplete file in the root of the bundle. | ||
=== Linux === | === Linux === | ||
On Linux, we basically move the <code>FIREFOX_NEW</code> over the existing installation directory, | On Linux, we basically move the <code>FIREFOX_NEW</code> over the existing installation directory, write "succeeded" to the manifest file, and restart Firefox. | ||
== Considered alternatives == | == Considered alternatives == | ||
| Line 69: | Line 69: | ||
= Downgrade = | = Downgrade = | ||
Firefox currently supports downgrading to older versions by installing an old installer over the new installation directory. The way that it works is that the Firefox installer first uninstalls the old version and then proceeds with the rest of the installation. This can be made possible in the face of background updates by | Firefox currently supports downgrading to older versions by installing an old installer over the new installation directory. The way that it works is that the Firefox installer first uninstalls the old version and then proceeds with the rest of the installation. This can be made possible in the face of background updates by relying on the uninstaller to know about the manifest file, and making the installer aware of the <code>FIREFOX_NEW</code> directory. The uninstaller should remove the <code>FIREFOX_NEW</code> directory as part of the uninstall process. The same handling is enough to correctly handle Firefox being uninstalled explicitly as well. | ||