Software Update:Processing Updates: Difference between revisions
Jump to navigation
Jump to search
m (→Overview) |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
This document describes the process of applying updates once they have been downloaded. | |||
== Overview == | |||
At startup or shutdown, a routine called from XRE_main may perform the following steps to process pending updates: | |||
* Check for the existance of an "updates" folder in the main application folder. | * Check for the existance of an "updates" folder in the main application folder. | ||
* Enumerate its subfolders and build a list sorted by folder name. | * Enumerate its subfolders and build a list sorted by folder name. | ||
* Select the first folder in the list that is marked as ''pending''. | * Select the first folder in the list that is marked as ''pending''. | ||
* Mark the selected folder as '' | * Mark the selected folder as ''applying''. | ||
* Spawn the updater application to apply the selected update. | * Copy the updater application into the folder for the update being applied. | ||
* At this point, | * Spawn the copy of the updater application to apply the selected update. | ||
* The updater takes over, applies the update (recording information to a log file for debugging purposes), and marks the update as either '' | * At this point, XRE_main exits. (NOTE: spawning the updater application may in fact mean that we call execv to load the updater image into the current process, but that is just an implementation detail.) | ||
* The updater then launches | * The updater takes over, applies the update (recording information to a log file for debugging purposes -- named ''update.log''), and marks the update as either ''succeeded'' or ''failed''. | ||
* Firefox performs any post-install work, including for example fixing up any Windows registry keys. | * The updater then (optionally) re-launches Firefox with a specified command line to resume execution. | ||
* Firefox then performs any post-install work, including for example fixing up any Windows registry keys. | |||
== Update Status == | == Update Status == | ||
| Line 18: | Line 21: | ||
<dl> | <dl> | ||
<dt>pending</dt><dd>The update is ready to be applied</dd> | <dt>pending</dt><dd>The update is ready to be applied</dd> | ||
<dt> | <dt>applying</dt><dd>The update is being applied</dd> | ||
<dt> | <dt>succeeded</dt><dd>The update was successfully applied</dd> | ||
<dt>failed</dt><dd>The update could not be applied</dd> | <dt>failed</dt><dd>The update could not be applied</dd> | ||
</dl> | </dl> | ||
This information is recorded in a text file named ''update.status'' stored in each update folder. | This information is recorded in a text file named ''update.status'' stored in each update folder. | ||
Latest revision as of 22:04, 4 May 2005
This document describes the process of applying updates once they have been downloaded.
Overview
At startup or shutdown, a routine called from XRE_main may perform the following steps to process pending updates:
- Check for the existance of an "updates" folder in the main application folder.
- Enumerate its subfolders and build a list sorted by folder name.
- Select the first folder in the list that is marked as pending.
- Mark the selected folder as applying.
- Copy the updater application into the folder for the update being applied.
- Spawn the copy of the updater application to apply the selected update.
- At this point, XRE_main exits. (NOTE: spawning the updater application may in fact mean that we call execv to load the updater image into the current process, but that is just an implementation detail.)
- The updater takes over, applies the update (recording information to a log file for debugging purposes -- named update.log), and marks the update as either succeeded or failed.
- The updater then (optionally) re-launches Firefox with a specified command line to resume execution.
- Firefox then performs any post-install work, including for example fixing up any Windows registry keys.
Update Status
As described above, each update will have a status associated with it. The states consist of the following:
- pending
- The update is ready to be applied
- applying
- The update is being applied
- succeeded
- The update was successfully applied
- failed
- The update could not be applied
This information is recorded in a text file named update.status stored in each update folder.