Software Update:Processing Updates

From MozillaWiki
Revision as of 00:34, 3 May 2005 by Darin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview of Process

During startup, Firefox will check for any updates that are ready to be applied and apply them. The process consists of the following:

  • 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 updating.
  • Spawn the updater application to apply the selected update.
  • At this point, firefox exits.
  • The updater takes over, applies the update (recording information to a log file for debugging purposes), and marks the update as either complete or failed.
  • The updater then launches firefox with a special command line flag to resume execution.
  • Firefox 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
  • updating - The update is being applied
  • complete - 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.