Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Side by Side Diff: autoupdate.py

Issue 4755001: Change update logic to be backwards compatible with old format. (Closed) Base URL: http://git.chromium.org/git/dev-util.git@master
Patch Set: .'s are unnecessary Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | stateful_update » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2009-2010 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 import cherrypy 7 import cherrypy
8 import os 8 import os
9 import shutil 9 import shutil
10 import subprocess 10 import subprocess
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 '--read_only', 254 '--read_only',
255 '--rootfs_mountpt=%s' % rootfs_dir, 255 '--rootfs_mountpt=%s' % rootfs_dir,
256 '--stateful_mountpt=%s' % stateful_dir, 256 '--stateful_mountpt=%s' % stateful_dir,
257 ]) 257 ])
258 _LogMessage('Tarring up /usr/local and /var!') 258 _LogMessage('Tarring up /usr/local and /var!')
259 subprocess.check_call(['sudo', 259 subprocess.check_call(['sudo',
260 'tar', 260 'tar',
261 '-czf', 261 '-czf',
262 output_gz, 262 output_gz,
263 '--directory=%s' % stateful_dir, 263 '--directory=%s' % stateful_dir,
264 '--transform=s,^dev_image,dev_image_new,',
265 '--transform=s,^var,var_new,',
264 'dev_image', 266 'dev_image',
265 'var', 267 'var',
266 ]) 268 ])
267 except: 269 except:
268 _LogMessage('Failed to create stateful update file') 270 _LogMessage('Failed to create stateful update file')
269 raise 271 raise
270 finally: 272 finally:
271 # Unmount best effort regardless. 273 # Unmount best effort regardless.
272 subprocess.call(['%s/mount_gpt_image.sh' % self.crosutils, 274 subprocess.call(['%s/mount_gpt_image.sh' % self.crosutils,
273 '--unmount', 275 '--unmount',
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 is_delta_format = self._IsDeltaFormatFile(filename) 590 is_delta_format = self._IsDeltaFormatFile(filename)
589 if label: 591 if label:
590 url = '%s/%s/update.gz' % (static_urlbase, label) 592 url = '%s/%s/update.gz' % (static_urlbase, label)
591 else: 593 else:
592 url = '%s/update.gz' % static_urlbase 594 url = '%s/update.gz' % static_urlbase
593 595
594 _LogMessage('Responding to client to use url %s to get image.' % url) 596 _LogMessage('Responding to client to use url %s to get image.' % url)
595 return self.GetUpdatePayload(hash, sha256, size, url, is_delta_format) 597 return self.GetUpdatePayload(hash, sha256, size, url, is_delta_format)
596 else: 598 else:
597 return self.GetNoUpdatePayload() 599 return self.GetNoUpdatePayload()
OLDNEW
« no previous file with comments | « no previous file | stateful_update » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698