| OLD | NEW |
| 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 Loading... |
| 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) |
| OLD | NEW |