AMO:Users/Checking For Updates

From MozillaWiki
Jump to: navigation, search

The Update Service:

  • checks for updates to the addons on a background timer
  • provides a means for the user to check for updates to the application
  • provide a set of controls for determining update behavior

The Background Timer

The system will automatically check for updates without user intervention:

  • every 24 hours

Regarding critical security updates, it would be useful to the user, if we could display a pop-up or similar sort (like what we have for-- " New updates available ") with the importance of this critical security update. This way we can inform the user the urgent need for the upgrade.

The Update Check

  1. generate update service URL
  2. determine if updates are available
  3. determine action
  4. download patches
  5. verify patches
  6. install patches

Update Service URL

The Service URL needs to incorporate data in these dimensions so as to reduce the complexity of the processing on the client side:

  • request version
  • app id
  • app version
  • addon id
  • addon version
  • target operating system
  • target architecture



The Updates File

VersionCheck.php returns an XML file that tells about available updates. It is formatted like this:

<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="" xmlns:em="">
<RDF:Description about="urn:mozilla:extension:{ffffffff-dddd-4dba-a131-aaaaaaaaaaaa}">
  <RDF:li resource="urn:mozilla:extension:{ffffffff-dddd-4dba-a131-aaaaaaaaaaaa}:0.1"/>

<RDF:Description about="urn:mozilla:extension:{ffffffff-dddd-4dba-a131-aaaaaaaaaaaa}:0.1">



This includes the UUID of the addon and the UUID of the application.

On the client side:

Preference Controls and State

  • extensions.update.enabled
trueEnables background update checking
falseDisables background update checking
  • app.update.interval
86400seconds between update checks
  • extensions.update.lastUpdateDate
1114648397seconds since epoch of last update time
  • extensions.update.severity.threshold
  • extensions.update.url
%REQ_VERSION% is the version of the request; %ITEM_ID% is the UUID of the addon; %ITEM_VERSION% is the version of the addon being inquired about; %ITEM_MAXAPPVERSION% is the maximum application version the addons is known to work with; %APP_ID% is the UUID of the application; %APP_VERSION% is the version of the application; %APP_OS% is the target OS; %APP_ABI is the target architecture%