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

Side by Side Diff: client/common_lib/cros/autoupdater.py

Issue 5519008: Create a cros directory under client, and start moving things into it. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 10 years 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 | « client/bin/site_ui_test.py ('k') | client/common_lib/site_auth_server.py » ('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) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 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 import httplib 5 import httplib
6 import logging 6 import logging
7 import re 7 import re
8 import socket 8 import socket
9 import urlparse 9 import urlparse
10 10
11 from autotest_lib.client.bin import chromeos_constants
12 from autotest_lib.client.common_lib import error 11 from autotest_lib.client.common_lib import error
12 from autotest_lib.client.cros import constants as chromeos_constants
13 13
14 STATEFULDEV_UPDATER = '/usr/local/bin/stateful_update' 14 STATEFULDEV_UPDATER = '/usr/local/bin/stateful_update'
15 UPDATER_BIN = '/usr/bin/update_engine_client' 15 UPDATER_BIN = '/usr/bin/update_engine_client'
16 UPDATER_IDLE = 'UPDATE_STATUS_IDLE' 16 UPDATER_IDLE = 'UPDATE_STATUS_IDLE'
17 UPDATER_NEED_REBOOT = 'UPDATE_STATUS_UPDATED_NEED_REBOOT' 17 UPDATER_NEED_REBOOT = 'UPDATE_STATUS_UPDATED_NEED_REBOOT'
18 UPDATED_MARKER = '/var/run/update_engine_autoupdate_completed' 18 UPDATED_MARKER = '/var/run/update_engine_autoupdate_completed'
19 19
20 20
21 class ChromiumOSError(error.InstallError): 21 class ChromiumOSError(error.InstallError):
22 """Generic error for ChromiumOS-specific exceptions.""" 22 """Generic error for ChromiumOS-specific exceptions."""
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 if not version_match: 156 if not version_match:
157 raise ChromiumOSError('Unable to get build ID from %s. Found "%s"', 157 raise ChromiumOSError('Unable to get build ID from %s. Found "%s"',
158 self.host.hostname, version) 158 self.host.hostname, version)
159 version, build_id, builder = version_match.groups() 159 version, build_id, builder = version_match.groups()
160 build_match = re.match(r'.*: (\d+)', builder) 160 build_match = re.match(r'.*: (\d+)', builder)
161 if build_match: 161 if build_match:
162 builder_num = '-b%s' % build_match.group(1) 162 builder_num = '-b%s' % build_match.group(1)
163 else: 163 else:
164 builder_num = '' 164 builder_num = ''
165 return '%s-r%s%s' % (version, build_id, builder_num) 165 return '%s-r%s%s' % (version, build_id, builder_num)
OLDNEW
« no previous file with comments | « client/bin/site_ui_test.py ('k') | client/common_lib/site_auth_server.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698