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

Issue 6344016: Fix common.sh to work in it's new location at /usr/lib/crosutils. (Closed)

Created:
9 years, 11 months ago by robotboy
Modified:
9 years, 7 months ago
Reviewers:
davidjames, sosa, anush
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

Fix common.sh to work in it's new location at /usr/lib/crosutils. If we are inside the chroot then we assume that the "gclient" root is ~/trunk. If we are outside the chroot we continue with the previous search mechanism to find the "gclient" root. Change-Id: Ia40de609ea596228fec2644ff3046e376b112b06 BUG=chromium-os:4230 TEST=run "src/scripts/cros_overlay_list --board tegra2 --variant seaboard" inside and outside the chroot, and under sudo. Review URL: http://codereview.chromium.org/6265028 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=30acb0b

Patch Set 1 #

Total comments: 1

Patch Set 2 : Switch to searching a list of possible locations for the gclient root. #

Total comments: 4

Patch Set 3 : Address review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -30 lines) Patch
M common.sh View 1 2 2 chunks +50 lines, -30 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
robotboy
This version looks to see if SUDO_USER exists and uses that to construct the home ...
9 years, 11 months ago (2011-01-26 21:08:19 UTC) #1
davidjames
http://codereview.chromium.org/6344016/diff/1/common.sh File common.sh (right): http://codereview.chromium.org/6344016/diff/1/common.sh#newcode37 common.sh:37: GCLIENT_ROOT="/home/${SUDO_USER:-$USER}/trunk" Hmm, so this doesn't work for me. ./enter_chroot.sh ...
9 years, 11 months ago (2011-01-26 21:26:14 UTC) #2
sosa
This patch works for the case that broke the tree for me i.e. ./enter_chroot.sh -- ...
9 years, 11 months ago (2011-01-26 22:16:19 UTC) #3
robotboy
OK, one more time. :) This version works in all known configurations (known to me ...
9 years, 11 months ago (2011-01-26 22:56:08 UTC) #4
davidjames
LGTM w/nits http://codereview.chromium.org/6344016/diff/6001/common.sh File common.sh (right): http://codereview.chromium.org/6344016/diff/6001/common.sh#newcode32 common.sh:32: if [ $INSIDE_CHROOT -eq 1 ]; then ...
9 years, 11 months ago (2011-01-26 23:41:33 UTC) #5
robotboy
9 years, 11 months ago (2011-01-26 23:59:34 UTC) #6
Thanks.

http://codereview.chromium.org/6344016/diff/6001/common.sh
File common.sh (right):

http://codereview.chromium.org/6344016/diff/6001/common.sh#newcode32
common.sh:32: if [ $INSIDE_CHROOT -eq 1 ]; then echo "/home/${USER}/trunk"
On 2011/01/26 23:41:33, davidjames wrote:
> Since this isn't a one-line if statement, better to put a newline between
'then'
> and 'echo'.

Done.

http://codereview.chromium.org/6344016/diff/6001/common.sh#newcode33
common.sh:33: if [ ! -z "${SUDO_USER}" ]; then echo "/home/${SUDO_USER}/trunk";
fi
On 2011/01/26 23:41:33, davidjames wrote:
> Any reason why you didn't use -n here (and elsewhere) instead of -z?

Done.

Powered by Google App Engine
This is Rietveld 408576698