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

Unified Diff: src/scripts/mount_gpt_image.sh

Issue 2106009: Always build pristine image as well as dev/test image. (Closed) Base URL: ssh://git@chromiumos-git//chromeos
Patch Set: Fix ws Created 10 years, 7 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 | « src/scripts/build_image ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/mount_gpt_image.sh
diff --git a/src/scripts/mount_gpt_image.sh b/src/scripts/mount_gpt_image.sh
index a739675d4965933f9c10bf4395c3afb702d7b846..a40a6bc31563dd413d9405c52279bdb56cbf6ad6 100755
--- a/src/scripts/mount_gpt_image.sh
+++ b/src/scripts/mount_gpt_image.sh
@@ -41,12 +41,10 @@ function unmount_image() {
"and ${FLAGS_rootfs_mountpt}"
# Don't die on error to force cleanup
set +e
- if [ -e "${FLAGS_rootfs_mountpt}/root/.dev_mode" ] ; then
- # Reset symlinks in /usr/local.
- setup_symlinks_on_root "/usr/local" "/var" \
- "${FLAGS_stateful_mountpt}"
- sudo umount "${FLAGS_rootfs_mountpt}/usr/local"
- fi
+ # Reset symlinks in /usr/local.
+ setup_symlinks_on_root "/usr/local" "/var" \
+ "${FLAGS_stateful_mountpt}"
+ sudo umount "${FLAGS_rootfs_mountpt}/usr/local"
sudo umount "${FLAGS_rootfs_mountpt}/var"
sudo umount -d "${FLAGS_stateful_mountpt}"
sudo umount -d "${FLAGS_rootfs_mountpt}"
@@ -84,16 +82,14 @@ function mount_image() {
get_gpt_partitions
fi
- # Mount var unconditionally and then setup /usr/local for user of dev mode.
+ # Mount directories and setup symlinks.
sudo mount --bind "${FLAGS_stateful_mountpt}/var" \
"${FLAGS_rootfs_mountpt}/var"
- if [ -e "${FLAGS_rootfs_mountpt}/root/.dev_mode" ] ; then
- sudo mount --bind "${FLAGS_stateful_mountpt}/dev_image" \
- "${FLAGS_rootfs_mountpt}/usr/local"
- # Setup symlinks in /usr/local so you can emerge packages into /usr/local.
- setup_symlinks_on_root "${FLAGS_stateful_mountpt}/dev_image" \
- "${FLAGS_stateful_mountpt}/var" "${FLAGS_stateful_mountpt}"
- fi
+ sudo mount --bind "${FLAGS_stateful_mountpt}/dev_image" \
+ "${FLAGS_rootfs_mountpt}/usr/local"
+ # Setup symlinks in /usr/local so you can emerge packages into /usr/local.
+ setup_symlinks_on_root "${FLAGS_stateful_mountpt}/dev_image" \
+ "${FLAGS_stateful_mountpt}/var" "${FLAGS_stateful_mountpt}"
echo "Image specified by ${FLAGS_from} mounted at"\
"${FLAGS_rootfs_mountpt} successfully."
}
« no previous file with comments | « src/scripts/build_image ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698