log.debug("Using newly downloaded checksums for %s %s" % (platform, locale)) # Cache the sums in-memory and on-disk. cacheChecksums(platform, locale, parseChecksumsFile(contents)) with open(checksumsFile, 'w') as f: f.write(contents) return checksums[platform][locale] for fromVersion, platform, locale, channels, updateTypes in pc.getUpdatePaths(): fromRelease = pc['release'][fromVersion] buildid = pc['release'][version]['platforms'][platform] fromBuildid = fromRelease['platforms'][platform] fromAppVersion = fromRelease['extension-version'] detailsUrl = substitutePath( pc['current-update']['details'], platform, locale, appVersion) optionalAttrs = pc.getOptionalAttrs(fromVersion, locale) checksumsUrl = substitutePath( pc['release'][version]['checksumsurl'], platform, locale) checksumsFile = path.join(options.checksumsDir, "%s-%s-%s-%s" % (appName, platform, locale, version)) info = getChecksum(platform, locale, checksumsFile) # We may have multiple update types to generate a snippet for... for type_ in updateTypes: # And also multiple channels... for channel in channels: log.debug("Processing: %s %s %s %s %s" % ( fromVersion, platform, locale, channel, type_)) url = pc.getUrl(fromVersion, platform, locale, type_, channel) filename = path.basename( pc.getPath(fromVersion, platform, locale, type_))
log.debug("Using newly downloaded checksums for %s %s" % (platform, locale)) # Cache the sums in-memory and on-disk. cacheChecksums(platform, locale, parseChecksumsFile(contents)) with open(checksumsFile, 'w') as f: f.write(contents) return checksums[platform][locale] for fromVersion, platform, locale, channels, updateTypes in pc.getUpdatePaths(): fromRelease = pc['release'][fromVersion] buildid = pc['release'][version]['platforms'][platform] fromBuildid = fromRelease['platforms'][platform] fromAppVersion = fromRelease['extension-version'] detailsUrl = substitutePath( pc['current-update']['details'], platform, locale, appVersion) optionalAttrs = pc.getOptionalAttrs(fromVersion) checksumsUrl = substitutePath( pc['release'][version]['checksumsurl'], platform, locale) checksumsFile = path.join(options.checksumsDir, "%s-%s-%s-%s" % (appName, platform, locale, version)) info = getChecksum(platform, locale, checksumsFile) # We may have multiple update types to generate a snippet for... for type_ in updateTypes: # And also multiple channels... for channel in channels: log.debug("Processing: %s %s %s %s %s" % ( fromVersion, platform, locale, channel, type_)) url = pc.getUrl(fromVersion, platform, locale, type_, channel) filename = path.basename( pc.getPath(fromVersion, platform, locale, type_))