OLD | NEW |
1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 from buildutil import BuildObject | 5 from buildutil import BuildObject |
6 from xml.dom import minidom | 6 from xml.dom import minidom |
7 | 7 |
8 import os | 8 import os |
9 import shutil | 9 import shutil |
10 import sys | 10 import sys |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 'factory_image': 'generic-factory.gz', | 199 'factory_image': 'generic-factory.gz', |
200 'factory_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', | 200 'factory_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', |
201 'release_image': 'generic-release.gz', | 201 'release_image': 'generic-release.gz', |
202 'release_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', | 202 'release_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', |
203 'oempartitionimg_image': 'generic-oem.gz', | 203 'oempartitionimg_image': 'generic-oem.gz', |
204 'oempartitionimg_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', | 204 'oempartitionimg_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', |
205 'efipartitionimg_image': 'generic-efi.gz', | 205 'efipartitionimg_image': 'generic-efi.gz', |
206 'efipartitionimg_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', | 206 'efipartitionimg_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', |
207 'stateimg_image': 'generic-state.gz', | 207 'stateimg_image': 'generic-state.gz', |
208 'stateimg_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', | 208 'stateimg_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', |
209 'systemrom_image': 'generic-systemrom.gz', | 209 'firmware_image': 'generic-firmware.gz', |
210 'systemrom_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', | 210 'firmware_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', |
211 'ecrom_image': 'generic-ecrom.gz', | |
212 'ecrom_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', | |
213 }, | 211 }, |
214 { | 212 { |
215 'qual_ids': set([6]), | 213 'qual_ids': set([6]), |
216 'factory_image': '6-factory.gz', | 214 'factory_image': '6-factory.gz', |
217 'factory_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', | 215 'factory_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', |
218 'release_image': '6-release.gz', | 216 'release_image': '6-release.gz', |
219 'release_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', | 217 'release_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', |
220 'oempartitionimg_image': '6-oem.gz', | 218 'oempartitionimg_image': '6-oem.gz', |
221 'oempartitionimg_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', | 219 'oempartitionimg_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', |
222 'efipartitionimg_image': '6-efi.gz', | 220 'efipartitionimg_image': '6-efi.gz', |
223 'efipartitionimg_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', | 221 'efipartitionimg_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', |
224 'stateimg_image': '6-state.gz', | 222 'stateimg_image': '6-state.gz', |
225 'stateimg_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', | 223 'stateimg_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', |
226 'systemrom_image': '6-systemrom.gz', | 224 'firmware_image': '6-firmware.gz', |
227 'systemrom_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', | 225 'firmware_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', |
228 'ecrom_image': '6-ecrom.gz', | |
229 'ecrom_checksum': 'AtiI8B64agHVN+yeBAyiNMX3+HM=', | |
230 }, | 226 }, |
231 ] | 227 ] |
232 The server will look for the files by name in the static files | 228 The server will look for the files by name in the static files |
233 directory. | 229 directory. |
234 | 230 |
235 If validate_checksums is True, validates checksums and exits. If | 231 If validate_checksums is True, validates checksums and exits. If |
236 a checksum mismatch is found, it's printed to the screen. | 232 a checksum mismatch is found, it's printed to the screen. |
237 """ | 233 """ |
238 f = open(filename, 'r') | 234 f = open(filename, 'r') |
239 output = {} | 235 output = {} |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 ok = self.BuildUpdateImage(latest_image_path) | 331 ok = self.BuildUpdateImage(latest_image_path) |
336 if ok != True: | 332 if ok != True: |
337 web.debug('Failed to build an update image') | 333 web.debug('Failed to build an update image') |
338 return self.GetNoUpdatePayload() | 334 return self.GetNoUpdatePayload() |
339 | 335 |
340 hash = self.GetHash('%s/update.gz' % self.static_dir) | 336 hash = self.GetHash('%s/update.gz' % self.static_dir) |
341 size = self.GetSize('%s/update.gz' % self.static_dir) | 337 size = self.GetSize('%s/update.gz' % self.static_dir) |
342 | 338 |
343 url = 'http://%s/static/update.gz' % hostname | 339 url = 'http://%s/static/update.gz' % hostname |
344 return self.GetUpdatePayload(hash, size, url) | 340 return self.GetUpdatePayload(hash, size, url) |
OLD | NEW |