Software Update:updates.xml Format: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 30: Line 30:


Every updates.xml contains a <code>updates</code> element as its root. This element has no attributes.
Every updates.xml contains a <code>updates</code> element as its root. This element has no attributes.
Beneath <code>updates</code> lives a sequence of <code>update</code> elements, each describing an update to an individual application version.
The attributes for <code>update</code> are as follows:
<table>
<tr><td>''type''</td><td><code>major</code> or <code>minor</code>. Major updates are for major application number revs, minor for security releases or incremental updates.</td></tr>
</table>
Within an <code>update</code> element there must be at least one and no more than two <code>patch</code> elements. The <code>patch</code> element describes a patch file that lives on a remote server that must be downloaded and applied to the application to update it to that version. The attributes for <code>patch</code> are as follows:


== Additional Client Metadata ==
== Additional Client Metadata ==

Revision as of 01:24, 8 November 2005

Background

The updates.xml format is the format used by the AUS server to advertise updates that are available to clients.

Format

A typical updates.xml file looks like this:

<?xml version="1.0"?>

<updates>
  <update type="minor" version="1.0.4" extensionversion="1.0" 
          detailsURL="http://www.foo.com/1.0.4/whatsnew.html">
    <patch type="partial" url="http://www.foo.com/1.0.4-partial.xpi"
           hashfunction="" hashvalue="" size=""/>
    <patch type="complete" url="http://www.foo.com/1.0.4-complete.xpi"
           hashfunction="" hashvalue="" size=""/>
  </update>
  ..
  <update type="major" version="1.1.2" extensionversion="1.1"
          detailsURL="http://www.foo.com/1.1.2/whatsnew.html">
    <patch type="complete" url="http://www.foo.com/1.1.2-complete.xpi"
           hashfunction="" hashvalue="" size=""/>
  </update>
</updates>

Elements & Attributes

Every updates.xml contains a updates element as its root. This element has no attributes.

Beneath updates lives a sequence of update elements, each describing an update to an individual application version.

The attributes for update are as follows:

typemajor or minor. Major updates are for major application number revs, minor for security releases or incremental updates.

Within an update element there must be at least one and no more than two patch elements. The patch element describes a patch file that lives on a remote server that must be downloaded and applied to the application to update it to that version. The attributes for patch are as follows:

Additional Client Metadata

The client uses this same format to collect a history of installed updates. In the process, it caches the update file locally in two places:

bin/active-update.xml (the update in progress, persisted across sessions) bin/updates.xml (updates performed in the past)

These files may contain additional attributes representing update state stored by the client.