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

Unified Diff: stateful_update

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « autoupdate.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: stateful_update
diff --git a/stateful_update b/stateful_update
index 7f5ddaec7e996bdf90bffddbca6b3778680b8431..673a4ae4f6fbefbb62a8f969ba98b502fed678cf 100755
--- a/stateful_update
+++ b/stateful_update
@@ -28,7 +28,6 @@ remove_quotes() {
update_dev_image () {
LSB_RELEASE="/etc/lsb-release"
STATEFUL_DIR="/mnt/stateful_partition"
- WORK_DIR="${STATEFUL_DIR}/stateful_update"
if [ -n "${FLAGS_ARGV}" ]; then
BASE_UPDATE_URL=$(remove_quotes "${FLAGS_ARGV}")
@@ -51,19 +50,14 @@ update_dev_image () {
fi
STATEFUL_UPDATE_URL="${BASE_UPDATE_URL}/stateful.tgz"
-
- # Prepare directories for update.
- rm -rf "${WORK_DIR}"
- mkdir "${WORK_DIR}"
-
- echo "Download stateful image from ${STATEFUL_UPDATE_URL}"
- # Unzip mount and copy the relevant directories.
- # Get the update.
+ echo "Downloading stateful payload from ${STATEFUL_UPDATE_URL}"
+ # Download and unzip directories onto the stateful partition.
eval "wget -qS -T 300 -O - \"${STATEFUL_UPDATE_URL}\"" | \
- tar -C ${WORK_DIR} -xz
+ tar --overwrite --directory=${STATEFUL_DIR} -xz
echo >&2 "Successfully downloaded update"
- if [ -d "${WORK_DIR}/var" ] && [ -d "${WORK_DIR}/dev_image" ] ; then
+ if [ -d "${STATEFUL_DIR}/var_new" ] && [ -d "${STATEFUL_DIR}/dev_image_new" ]
+ then
echo >&2 "Notifying startup that an update is available"
touch "${STATEFUL_DIR}/.update_available"
else
« no previous file with comments | « autoupdate.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698