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

Unified Diff: enter_chroot.sh

Issue 3318005: Use correct log functions for enter_chroot's console spew. (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: fix accidental clobbering of ellyjones change Created 10 years, 4 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: enter_chroot.sh
diff --git a/enter_chroot.sh b/enter_chroot.sh
index f1c0267c3483071978cc2f8f3edec6c72c5d8044..a72e7ac287fa23735f3feb66af64eb3c0a0a7351 100755
--- a/enter_chroot.sh
+++ b/enter_chroot.sh
@@ -81,7 +81,7 @@ function setup_env {
flock 200
echo $$ >> "$LOCKFILE"
- echo >&2 "Mounting chroot environment."
+ info "Mounting chroot environment."
# Mount only if not already mounted
MOUNTED_PATH="$(readlink -f "$FLAGS_chroot/proc")"
@@ -142,10 +142,10 @@ function setup_env {
2>/dev/null)"
fi
if [[ ( -z "$CHROME_ROOT" ) || ( ! -d "${CHROME_ROOT}/src" ) ]]; then
- echo >&2 "Not mounting chrome source"
+ info "Not mounting chrome source"
kliegs 2010/09/02 15:34:30 NIT: This should be switched to conditional and be
sudo rm -f "${FLAGS_chroot}${CHROME_ROOT_CONFIG}"
else
- echo >&2 "Mounting chrome source at: $INNER_CHROME_ROOT"
+ info "Mounting chrome source at: $INNER_CHROME_ROOT"
echo "$CHROME_ROOT" | \
sudo dd of="${FLAGS_chroot}${CHROME_ROOT_CONFIG}"
mkdir -p "$MOUNTED_PATH"
@@ -158,12 +158,12 @@ function setup_env {
if [ -z "$(mount | grep -F "on $MOUNTED_PATH ")" ]
then
if [ $(which gclient 2>/dev/null) ]; then
- echo >&2 "Mounting depot_tools"
+ info "Mounting depot_tools"
DEPOT_TOOLS=$(dirname $(which gclient) )
mkdir -p "$MOUNTED_PATH"
if ! sudo mount --bind "$DEPOT_TOOLS" "$MOUNTED_PATH"; then
- echo >&2 "depot_tools failed to mount; perhaps it's on NFS?"
- echo >&2 "This may impact chromium build."
+ warn "depot_tools failed to mount; perhaps it's on NFS?"
+ warn "This may impact chromium build."
fi
fi
fi
@@ -171,7 +171,7 @@ function setup_env {
# Install fuse module.
if [ -c "${FUSE_DEVICE}" ] ; then
sudo modprobe fuse 2> /dev/null ||\
- echo >&2 "-- Note: modprobe fuse failed. gmergefs will not work"
+ warn "-- Note: modprobe fuse failed. gmergefs will not work"
fi
# Turn off automounting of external media when we enter the
@@ -181,10 +181,10 @@ function setup_env {
gconftool-2 -g ${AUTOMOUNT_PREF} > \
"${FLAGS_chroot}${SAVED_AUTOMOUNT_PREF_FILE}"
if [ $(gconftool-2 -s --type=boolean ${AUTOMOUNT_PREF} false) ]; then
- echo >&2 "-- Note: USB sticks may be automounted by your host OS."
- echo >&2 "-- Note: If you plan to burn bootable media, you may need to"
- echo >&2 "-- Note: unmount these devices manually, or run image_to_usb.sh"
- echo >&2 "-- Note: outside the chroot."
+ warn "-- Note: USB sticks may be automounted by your host OS."
+ warn "-- Note: If you plan to burn bootable media, you may need to"
+ warn "-- Note: unmount these devices manually, or run image_to_usb.sh"
+ warn "-- Note: outside the chroot."
fi
fi
@@ -219,15 +219,15 @@ function teardown_env {
if [ $(which gconftool-2 2>/dev/null) ]; then
SAVED_PREF=$(cat "${FLAGS_chroot}${SAVED_AUTOMOUNT_PREF_FILE}")
gconftool-2 -s --type=boolean ${AUTOMOUNT_PREF} ${SAVED_PREF} || \
- echo >&2 "could not re-set your automount preference."
+ warn "could not re-set your automount preference."
fi
if [ -s "$LOCKFILE" ]; then
- echo >&2 "At least one other pid is running in the chroot, so not"
- echo >&2 "tearing down env."
+ info "At least one other pid is running in the chroot, so not"
+ info "tearing down env."
else
MOUNTED_PATH=$(readlink -f "$FLAGS_chroot")
- echo >&2 "Unmounting chroot environment."
+ info "Unmounting chroot environment."
# sort the list of mounts in reverse order, to ensure umount of
# cascading mounts in proper order
for i in \
@@ -241,10 +241,10 @@ function teardown_env {
if [ $FLAGS_mount -eq $FLAGS_TRUE ]
then
setup_env
- echo >&2 "Make sure you run"
- echo >&2 " $0 --unmount"
- echo >&2 "before deleting $FLAGS_chroot"
- echo >&2 "or you'll end up deleting $FLAGS_trunk too!"
+ info "Make sure you run"
+ info " $0 --unmount"
+ info "before deleting $FLAGS_chroot"
+ info "or you'll end up deleting $FLAGS_trunk too!"
exit 0
fi
@@ -276,7 +276,7 @@ REVISION=$(git rev-parse --short=8 HEAD)
CHROOT_PASSTHRU="CHROMEOS_REVISION=$REVISION BUILDBOT_BUILD=$FLAGS_build_number CHROMEOS_OFFICIAL=$CHROMEOS_OFFICIAL"
if [ -d "$HOME/.subversion" ]; then
# Bind mounting .subversion into chroot
- echo >&2 "mounting ~/.subversion into chroot"
+ info "mounting ~/.subversion into chroot"
MOUNTED_PATH="$(readlink -f "${FLAGS_chroot}/home/${USER}/.subversion")"
if [ -z "$(mount | grep -F "on $MOUNTED_PATH ")" ]; then
mkdir -p "$MOUNTED_PATH"
« 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