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

Unified Diff: client/common_lib/cros/autoupdater.py

Issue 6021006: Add stateful partition reset to upgrade process. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: Bootstrap stateful_update. Created 9 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/common_lib/cros/autoupdater.py
diff --git a/client/common_lib/cros/autoupdater.py b/client/common_lib/cros/autoupdater.py
index 244cbbdd117d6f9ec88c76f4f07641c2a52be77c..f23a2848d399361266d05e297e828fcdf699bddc 100644
--- a/client/common_lib/cros/autoupdater.py
+++ b/client/common_lib/cros/autoupdater.py
@@ -11,7 +11,11 @@ import urlparse
from autotest_lib.client.common_lib import error
from autotest_lib.client.cros import constants as chromeos_constants
-STATEFULDEV_UPDATER = '/usr/local/bin/stateful_update'
+# TODO(dalecurtis): HACK to bootstrap stateful updater until crosbug.com/8960 is
+# fixed.
+LOCAL_STATEFULDEV_UPDATER = ('/home/chromeos-test/chromeos-src/chromeos/src'
+ '/platform/dev/stateful_update')
+STATEFULDEV_UPDATER = '/tmp/stateful_update'
UPDATER_BIN = '/usr/bin/update_engine_client'
UPDATER_IDLE = 'UPDATE_STATUS_IDLE'
UPDATER_NEED_REBOOT = 'UPDATE_STATUS_UPDATED_NEED_REBOOT'
@@ -117,8 +121,19 @@ class ChromiumOSUpdater():
# is testable after we run the autoupdater.
statefuldev_url = self.update_url.replace('update', 'static/archive')
- statefuldev_cmd = ' '.join([STATEFULDEV_UPDATER, statefuldev_url,
- '2>&1'])
+ # TODO(dalecurtis): HACK to bootstrap stateful updater until
+ # crosbug.com/8960 is fixed.
+ self.host.send_file(LOCAL_STATEFULDEV_UPDATER, STATEFULDEV_UPDATER,
+ delete_dest=True)
+ statefuldev_cmd = [STATEFULDEV_UPDATER, statefuldev_url]
+
+ # TODO(dalecurtis): HACK necessary until R10 builds are out of testing.
+ if int(self.update_version.split('.')[1]) > 10:
+ statefuldev_cmd.append('--stateful_change=clean')
+
+ statefuldev_cmd.append('2>&1')
+ statefuldev_cmd = ' '.join(statefuldev_cmd)
+
logging.info(statefuldev_cmd)
try:
self._run(statefuldev_cmd, timeout=600)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698