Implementation

repackage.helpers

class repackage.helpers.Extractor(install_rdf)[source]

Extracts manifest from install.rdf

modified Extractor class from zamboni/apps/versions/compare.py

ADDON_EXTENSION = '2'
find(name, ctx=None)[source]

Like $() for install.rdf, where name is the selector.

find_root()[source]
manifest = u'urn:mozilla:install-manifest'
read_manifest(package_overrides={})[source]

Extracts data from install.rdf, assignes it to self.data

Param:target_version (String) forces the version
Returns:dict
uri(name)[source]
class repackage.helpers.Repackage[source]
cleanup()[source]

closes all files opened during the repackaging

download(location)[source]

Downloads the XPI (from location) and instantiates XPI in self.xpi_zip

This eventually will record statistics about build times

Param:location (String) location of the file to download rebuild XPI
Returns:None
extract_packages(sdk_source_dir)[source]

Builds SDK environment and calls the xpi.xpi_utils.build()

Returns:temporary sdk_dir
get_manifest(package_overrides={})[source]

extracts manifest from install.rdf it does not contain all dependencies, these will be appended during copying package files

Sets the self.manifest field

rebuild(sdk_source_dir, hashtag, package_overrides={}, options=None)[source]

Drive the rebuild process

Param:sdk_source_dir (String) absolute path of the SDK
Param:hashtag (String) filename for the buid XPI
Param:target_version (String)
retrieve(xpi_from)[source]

Handles upload

Param:xpi_from (element of request.FILES)
repackage.helpers.increment_version(version)[source]

Modify version string to indicate changes made by repacking

Attr:version (string) version to be modified