Background Updates: Difference between revisions

Jump to navigation Jump to search
Line 17: Line 17:
# Any of the other projects falling under the "silent update" umbrella
# Any of the other projects falling under the "silent update" umbrella


= Implementation =
= Implementation =
 
== Background updates ==
Here is a proposal for how background updates will be implemented.  
Here is a proposal for how background updates will be implemented.  


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.new".  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.new".  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 will be known as a file named "update.pending" located in the root of the existing Firefox installation.
** The manifest file will be known as an empty file named "update.pending" located in the root of the existing Firefox installation.
* 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 will be removed.
** If this file exists, it will be removed.
* 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.
* 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.
* The updater binary will write a new manifest file to the existing installation directory.
* The updater binary will write a new manifest file to the existing installation directory.
* 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 resume searching for new updates.
* The Firefox main process will resume searching for new updates.
== Firefox startup ==
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.
* If the manifest file is found, Firefox looks for the known <code>FIREFOX_NEW</code> directory.  If that directory is not found, Firefox removes 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.
Confirmed users
657

edits

Navigation menu